C programming in OS X from Solaris?

Discussion in 'Mac Programming' started by Nitrocide, Dec 8, 2007.

  1. Nitrocide macrumors 6502

    Nitrocide

    Joined:
    Sep 24, 2005
    Location:
    Bristol, UK
    #1
    Hey,

    Basically, i do C programming at UNI as part of my course on a Solaris machine. I dont have a Solaris machine, so which program should i use in OS X to do similar C programming?


    Sorry if thats a really dumb question, i tried xcode a while ago, but got a bit lost.

    Thankyou!
     
  2. mduser63 macrumors 68040

    mduser63

    Joined:
    Nov 9, 2004
    Location:
    Salt Lake City, UT
  3. Sijmen macrumors 6502a

    Joined:
    Sep 7, 2005
    #3
    For smaller things, you could try TextMate or vim. In the long run, on OS X, Xcode is what you need.
     
  4. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #4
    I've been a Solaris user from day one. Be Solaris came out I used Sun's previous system "Sun OS"

    Two answers:

    1) Almost anything that will work on Solaris will work on Mac OS X. Bring up a terminal window and you will find that vi, gcc and make are all there. What else does a Solaris programer need? Ok maybe GNU Autotools, emacs or nedit and a million other things. Look up the "fink" web site at http://www.finkproject.org/ They have packaged up everything you need.

    2) Get VMware Fusion. Install it on the Mac. Then go to the Sun web site and get Solaris 10. Solaris runs well under Fusion.
     
  5. dannyjames macrumors newbie

    Joined:
    Jul 24, 2006
    #5
    C programming on a mac

    I am currently taking a C programming course on windows but since I have a mac (Powerbook G4 to be exact) and I do all of my programming in xcode. I think I choose "standard library" under BSD and then select a command line or C application under that. All of my programs run just fine under windows except for one cavat, I have to use the getchar instead of the getch command in my programs. I think I read somewhere that getch was a pc only command or something like that. Getchar does the same thing though.

    Anyway, I currently do not have my powerbook but I will get back to you tomorrow on exactly what steps I have to take when writing a C program on my powerbok.

    Good luck!
     
  6. yeroen macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #6
    Xcode is really nice, but you don't need the Xcode front-end to develop.

    vi/emacs, gcc, make, etc. work as well in the terminal as they do anywhere else on Unix.
     
  7. Nitrocide thread starter macrumors 6502

    Nitrocide

    Joined:
    Sep 24, 2005
    Location:
    Bristol, UK
    #7
    Thankyou so much guys! I forgot i posted to here, remembered again today though!

    I tried installing Solaris 10 through Fusion before and it had some problems if i remember correctly :confused:, ill try again though.

    I had a C programming test last week but actually didnt do too shockingly!

    Thanks again guys!

    x
     
  8. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #8
    Ensure you assign a decent chunk of RAM to the virtual machine whilst you're installing Solaris. Preferably about 512Mb. You can always reduce this after its installed. If you try to install with less you can run into strange issues.
     
  9. Nitrocide thread starter macrumors 6502

    Nitrocide

    Joined:
    Sep 24, 2005
    Location:
    Bristol, UK
    #9
    By the way, TextMate worked really well as far as I can see. Im only doing c programming on this course for 6 more months, and I'm hoping it's not included in the syllabus again to be honest! I just needed something to let me practice more than anything.

    Cheers!
     
  10. Nitrocide thread starter macrumors 6502

    Nitrocide

    Joined:
    Sep 24, 2005
    Location:
    Bristol, UK
    #10
    Thanks for the reply, well i have 2 gigs installed, and I'm pretty sure i split resources 50/50, i think it was more of an issue with my hard drive setup more than anything.
     
  11. sord macrumors 6502

    Joined:
    Jun 16, 2004
    #11
    getch is part of curses, and works just fine in most platforms (assuming you link against curses and have your program setup to use it). My guess is Microsoft (in an effort to ruin the world) added their own getch for when not using curses (assuming curses is available on Windows)...
     

Share This Page