Author Topic: Mac C Programming?  (Read 6509 times)

0 Members and 2 Guests are viewing this topic.

Offline Awesomeness

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +0/-0
    • View Profile
Mac C Programming?
« on: September 16, 2011, 11:10:16 pm »
I have working ndless on my calculator.  How do I program with C in it?  I have basic experience in C; I just need a basic tutorial on how to put a "Hello world" program over.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Mac C Programming?
« Reply #1 on: September 17, 2011, 02:05:58 am »
There are several topics around here, and some information on Hackspire :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Awesomeness

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +0/-0
    • View Profile
Re: Mac C Programming?
« Reply #2 on: September 17, 2011, 10:20:46 am »
Could you please link to them?  I can't find these topics you speak of :P

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Ndless.me with the finest TI-Nspire programs

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Mac C Programming?
« Reply #4 on: September 18, 2011, 12:52:12 pm »
It might be a little bit more difficult to do what's detailed in that website on a Mac, though.

You may have to rebuild some stuff by yourself...

For the C programming editor, by the way, I'd recommand XCode.

Than you can link some script to it to automatically compile through the arm toolchain etc.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Awesomeness

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +0/-0
    • View Profile
Re: Mac C Programming?
« Reply #5 on: September 18, 2011, 08:05:32 pm »
I don't think it's possible.  Macs don't come with things like make and wget and apt-get.  They're Unix, but weird.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Mac C Programming?
« Reply #6 on: September 19, 2011, 12:57:28 am »
Quote
Macs don't come with things like make [snip] and apt-get
Neither do most flavors of Linux, out of the box :)
apt-get is one of the packaging tools of Debian and derivatives, and most distributions do not include, due to space constraints, build-essentials (or equivalent), in their out of the box configuration. And some distros out there might have curl instead of wget.

On MacOS X, use MacPorts :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Mac C Programming?
« Reply #7 on: September 19, 2011, 06:30:14 am »
If you install Xcode (Developer Suite), all the things like Make, gcc, gdb etc. will be available.

MacPorts is quite useful indeed, btw
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Awesomeness

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 15
  • Rating: +0/-0
    • View Profile
Re: Mac C Programming?
« Reply #8 on: September 20, 2011, 05:28:08 pm »
If you install Xcode (Developer Suite), all the things like Make, gcc, gdb etc. will be available.

MacPorts is quite useful indeed, btw

orly?



Yes, this is a 100% legit copy of the dev suite.  It may be quite old though.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Mac C Programming?
« Reply #9 on: September 20, 2011, 06:38:20 pm »
You can also use LLVM instead of GCC. Have you tried reading the man pages for the tools to figure out how to call them?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Mac C Programming?
« Reply #10 on: September 21, 2011, 05:21:23 pm »
Try making a very basic C program in XCode.

Check in the project' settings whether it compile through GCC or LLVM.

 ^ You hould have both if you install a pretty new verion of XCode. (> 3.something I think).


try "locate gcc"  it shoudl be in /usr/bin/... ?
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation