Mac difficult development platform?

Discussion in 'Mac Programming' started by breatheasy, May 1, 2010.

  1. breatheasy macrumors member

    Mar 9, 2010
    Hi, I learned to program on Linux and recently bought a mac.

    My experiences so far have been almost completely negative, mainly it's because it's been a complete nightmare for me to get any libraries installed.

    First I tried to install the boost c++ libraries and failed miserably. Tried 3 tutorials on the internet to get them working and nothing worked. On ubuntu this was one command in the terminal and everything was in the right place. I have given up on this for now.

    Next I tried to install the OGRE libraries and had a similar experience.

    Then I tried to install python and the pygame module using the installer, guess what? import pygame didnt work.

    Am i missing something? or am I just unlucky in that I am trying to install awkward things?

    I have tried fink and macports and they seem to install things in obscure and non-intuitive places.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    This could be rephrased as "Hi, I'm trying to install and use non-standard components instead of using the system-provided ones and it's not woking". Development on the Mac is different to Linux. Trying to treat them the same is, in general, not a good idea.
  3. larkost macrumors 6502a

    Oct 13, 2007
    To soften this a bit, it does seem that at least some of your problems are based in your expectations: you have been doing it one way on linux and things are going to be different on another platform (MacOS X in this case).

    My experience with fink and macports is that they are very consistant in where they put things, and once you are used to that it will feel fine. The reason they are putting things in /opt is that they are trying to stay out of the way of the OS. Since they are not integrated into Apple's updating system they need to keep a buffer between their code and Apples (this is a practical thing, not legal or whatnot) to keep from having bad interactions durring updates.

    My guess on your pygame problem is that you were using the built-in python, but the installer only added the pygame module to the path for the version you added. Just a guess, but a reasonable one.

    You don't describe anything about your problems with getting libraries to work, but similar forces are probably at work. The thing you are going to have to do is to come to grips with the idea that what you learned elsewhere is only going to partially apply here. There is going to be a lot of learning to do, and having learned things elsewhere is sometimes going to be a hinderance not a help.
  4. Ice Cream Man macrumors member

    Ice Cream Man

    Jan 1, 2003

    Very true.

    Using x11 can help, if the apps you want from linux are x11. I personally prefer the Dev Tools that come with OSX anyway. But really one will have negative experiences when they try to drive a nail in with a spanner.

    You could try running your favorite flavor of linux in VirtualBox inside OSX. Then just load the tools you want to use into it. You might also try the OSX dev tools. Or other OSX native tools. Or find the tools you use in an OSX native build.
  5. breatheasy thread starter macrumors member

    Mar 9, 2010
    Thanks for the replies, I see what you are saying.

    Can anyone recommend any decent tutorials about how to get started with xcode and the frameworks provided, and how to install 3rd party libraries?
  6. Thomas Harte macrumors 6502

    Nov 30, 2005
    The provided frameworks are C and Objective-C, not C++. Objective-C is significantly simpler than C++ but comes from a different heritage (ie, Smalltalk, not Simula) so can be a bit of a culture shock.

    Apple's introduction to Objective-C is probably a good place to start. If you're planning on spending money then the Kochan book is really good.
  7. larkost macrumors 6502a

    Oct 13, 2007
    Thomas is correct in that the central Frameworks in MacOS X (Cocoa, Foundation, and CoreFoundation) are in C and Obj-C, there are still the Carbon Frameworks that at C and C++. However these should be viewed as somewhat legacy items, and new development should be steered towards using the Cocoa Frameworks.

    Nicely Apple has done some great work in making C++ and Obj-C live together. So if you want to use modules in C++ and integrate them with GUI code in Obj-C you can do so. Mostly you have to bridge through C structures (the only common ground), but code from all three stripes can live in the same file (.mm).
  8. mdatwood macrumors 6502a

    Mar 14, 2010
    Denver, CO
    Non-standard components? Boost is a set of c++ helpers that is pretty much standard for anyone working with c++ now. OGRE3D is a graphics engine/library and is widely used. What do you instead suggest he use since he's moved to OS X? What free engines are out there that he can start with that are 'system-provided' ones? Do you want him to waste his time creating an engine (when a perfectly suitable ones exist) when he could be working on creating his actual program?

    To the OP. It shouldn't be very hard to get everything working. OGRE3D has an OSX version and boost is just something you need to include into XCode. Try this simple fix to get boost working.
  9. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    I wrote these myself.

    Compiling Boost on Mac OS X.

    Using Open Source Libraries on Mac OS X.

    The process of installing libraries is exactly the same as Linux and other Unix distributions though.

Share This Page