Programming on a Mac...

Discussion in 'General Mac Discussion' started by Shakermaker, Feb 8, 2002.

  1. Shakermaker macrumors newbie

    Joined:
    Feb 8, 2002
    Location:
    Portugal
    #1
    Hi, I'm a student from Portugal. I've been fascinated by the Mac platform for a while, but it's only know that I've put together enough money to buy a computer just for myself (it's hard earning money being a high-school student ;) ).

    The thing is, that I intend to study Systems Engineering, and I wondered if the Mac was the right choice. As universities here are PC/Linux dominated, i was wondering...

    Is it possible to program C, C++, Pascal, or any other mainstream computer language on the mac? If it is, can I take the code and compile it so it's viewable on PCs? Can I take the code and work normally with it on a PC? Which programs can I use?

    Thanks in advance.
     
  2. Durandal7 macrumors 68040

    Joined:
    Feb 24, 2001
    #2
    C and C++ are available on the mac as well as Pascal I believe. While it is C code at the core much of it must be changed in a (sometimes tedious) process called porting. Event triggers,system calls and frameworks on the mac are completly different from a PC. Your code will be viewable but not compilable on a PC. The only way to pull that off is to compile a UNIX application which would require less tinkering to work with Darwin. This is of course assuming that RealBasic isn't an option.
    If you do program on the Mac I would recommend Codewarrior or OS X's own development tools.
    Install VirtualPC if you want Windows compatibility.
     
  3. balliet macrumors member

    Joined:
    Dec 21, 2001
    #3
    If all you are doing is simple command line apps in C, C++, or Java, you should have no problems running them on OS X. You don't even need any extra software. OS X comes will all the development tools you'll need. A simple recompile is all it should take for 90% of the apps. If you get into X11/Qt/GTK+ or other GUI development, there is some other stuff you need to install (all free software), but its still doable on OS X.

    Now Win32 programming is a completelly different story, but you said "PC/Linux", so I assume you're not doing any Win32.

    Also if you want to write apps that use Aqua (OS X's GUI), you need to use either the Carbon or Cocoa APIs. Some Cocoa apps might work on Linux with GNUStep, but don't count on it.

    asurace is right that there is a lot of stuff out there that does need porting, but assuming your code is simple as the stuff I'm writing for school now (I'm a first year IT student), you shouldn't have any problems.
     
  4. Beej macrumors 68020

    Beej

    Joined:
    Jan 6, 2002
    Location:
    Buffy's bedroom
    #4
    I'm about to start the final year of my Computer Science degree. There has not been a single thing that I've needed to do that I couldn't do in Mac OS X.

    Mac OS X is one of the best things that has ever happened to me... it's saved me soooooooo much trouble in this area.

    So I say: go for it! Get a Mac!
     
  5. agp macrumors member

    Joined:
    Jan 11, 2002
    #5
    Software Engineering

    I am in my 3rd year of my Software Engineering degree, and only recently a Mac convert(about 6-9months).

    I have had absolutely no problem using a Mac to program on, and for the odd time you do need a PC you can run VPC or use University computers.

    Most of the environments we have used for programming languages such as Prolog and Scheme in have equivalent environments on the mac (at least in OS 9).

    Before I started my degree I almost bought an iMac, but bought a PC because I thought a mac wasn't sufficient for my needs.

    For the two years leading up to my mac purchase my housemate had a mac and was on the same course. I could see that it was fine for everything and took the plunge since they are so nice (and I photoshop a lot!)

    Hope I have persuaded you!

    Adrian
     
  6. Shakermaker thread starter macrumors newbie

    Joined:
    Feb 8, 2002
    Location:
    Portugal
    #6
    Thanks!

    Here's the thing, when I wrote PC/Linux, I meant Windows/Linux, this is, both.

    How is the porting process?? It sounds as if it's not too easy too do it...
     
  7. Falleron macrumors 68000

    Falleron

    Joined:
    Nov 22, 2001
    Location:
    UK
    #7
    Virtual PC is the way forward for you. It is an ideal place to run the same software as on your university systems + also have the advantages of the Mac.
     
  8. Shakermaker thread starter macrumors newbie

    Joined:
    Feb 8, 2002
    Location:
    Portugal
    #8
    But isn't VPC too slow for that kind of development? In long programs, does it run well?
     
  9. Falleron macrumors 68000

    Falleron

    Joined:
    Nov 22, 2001
    Location:
    UK
    #9
    Hmmm, I dont have any figures + I have never programmed using VPC but from my experience + what people have said in other threads a new mac will probably emulate a 600Mhz PC? Of course it depends on which OS you are running + how much RAM you have but it has always done what I have asked of it.

    VPC is no substitute for a real PC but it does the job. There must be software for the mac to let people program (+ still be compatible with PC's)!!
     
  10. afonso macrumors member

    Joined:
    Feb 5, 2002
    Location:
    San Francisco
    #10
    Programming!! :)

    Hey Shaker,

    I did a whole 3 year course in Computer Science and I'm currently finishing a Masters degree in Computing as well.

    I did every single coursework on the Mac, ranging from C, C++, Java, OpenGL, Assembler, whatever really.

    There shouldn't be any problem for you, specially if you use OSX to do all the programming. The OSX development tools are EXCELLENT!!!

    I am currently programming a Visual Prolog IDE for MacOS X, written entirely in Cocoa/Objective-C...

    And by the way... tambem sou portugues... se tiveres algum problema vai dizendo q eu ajudo no q for preciso :)

    Take care, boa sorte, and I'll see you around!
    Afonso
     
  11. agp macrumors member

    Joined:
    Jan 11, 2002
    #11
    Linux

    BTW, you can also install SUSE Linux on your mac if you need too.

    So, you can have

    1. Mac OS 9
    2. Mac OS X
    3. VPC running any windows or PC linux system
    4. SUSE Linux.

    What else do you need?
     
  12. Choppaface macrumors 65816

    Joined:
    Jan 22, 2002
    Location:
    SFBA
    #12
    the VPC representatives over at their board said that VPC will probably only emulate a 200mhz to 300mhz equivalent pentium even on the fastest sytems. maybe they've updated their figures, but at that time the dual 800 was the fastest system....
     
  13. Taft macrumors 65816

    Taft

    Joined:
    Jan 31, 2002
    Location:
    Chicago
    #13
    So many programmers...

    Its great to see so many CS majors using Macs!! I myself am a graduate in computer science and wish I would've had OS X when I was in school. It truely is a Unix/Mac programmers dream.

    I hope all of you programmers keep hanging out here. :)

    Matthew
     
  14. oldMac macrumors 6502a

    Joined:
    Oct 25, 2001
    #14
    OS X

    OS X has definitely made it easier for us programmers who like macs.
     
  15. evildead macrumors 65816

    evildead

    Joined:
    Jun 18, 2001
    Location:
    WestCost, USA
    #15
    Im a CS suddent too

    I use the new OS X develper tools for everything. I do for school.... well.. almost. I have to code in Assembly for the x86 some times and in LISP. No mac assemblers or interpriters for those. :(

    Apple give you developer tools with OS X do develope in JAVA and C++ plus many more...

    You can get IDE's from Borland, CoadWarrior, And there is a new one for Fortran too.

    All OS X friendlyn :)

    When you absolutly have to use Windows (I did for Visual Basic) you can run Virtual PC 5.0. It does a pretty good job of emulation.
     
  16. Shakermaker thread starter macrumors newbie

    Joined:
    Feb 8, 2002
    Location:
    Portugal
    #16
    Thanks a lot everyone!. You've been really helpful. I think I'm getting the iMac!
     

Share This Page