Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Build Update

Thanks to the hackers of the world, I now have Mac OS X running on my netbook. It's going to take me a while to learn all this stuff. But I can imagine a new project wizard that sets up the project correctly and generates a Makefile that puts files in the right place.

On Wed, Mar 10, 2010 at 10:58 AM, Michael Jackson <mike.jackson@xxxxxxxxxxxxxx> wrote:

On Mar 10, 2010, at 10:50 AM, Alex Blewitt wrote:

On 10 Mar 2010, at 14:26, Michael Jackson wrote:
Just FYI <http://www.itk.org/pipermail/insight-users/2010-March/035675.html> is the start of an email thread with a new CDT user coming from Xcode and trying to get everything setup correctly. Might be enlightening to see what someone is going through.

Eclipse apps are laid out in a (somewhat peculiar) folder structure which has implications on how they're run/debugged. For example, if I'm building a GUI application (i.e. not a simple command line tool) then the folder structure needs to look like:

Foo.app/Contents/MacOS/Foo

There's also other metadata that is used with the application, like the Info.plist, and where Resources are loaded from, which need to be in particular places:

Foo.app/Contents/Info.plist
Foo.app/Contents/Resources/Foo.icns

The Info.plist also contains relative paths that point to some of these.

Furthermore, dynamically linked libraries on Mac use DYLD_LIBRARY_PATH to specify which folder(s) to search for library look ups, rather than LD_LIBRARY_PATH on Unix. So this would be need to be set by the launch configuration if you were building (and subsequently using) a dynamic library.

Note that Xcode spits out a folder structure that has all of these, and from Finder, Foo.app just shows up as a double-clickable icon in Finder (and most often, without the .app being displayed). Yet you can have an (empty) directory called Foo.app which will be shown the same way, but won't be launchable as it's missing the innards.

Unix - and to a lesser extent, Windows - doesn't have any such constraints on the folder structure. On the other hand, they also don't have a single drag-and-drop of an icon to install a program, either :-)

Alex

http://developer.apple.com/mac/library/documentation/corefoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html

http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/dyld.1.html

CMake will also generate the app folder structure if you tell it to. The biggest problem is that CMake likes to put off copying libraries into the .app package until an "install" is run. I do not think I have ever had a problem debugging a Mac .app with Eclipse. Usually CDT will find the binary during the project refresh, and then you can just right click on it and "Debug local C++ application"

Mike Jackson


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top