wizard_oz
15th February 2010, 17:56
Hello,
I have been battling with compiling a test C++ application on OS X, v10.6 "Snow Leopard". We're mostly Windows developers, though we have experience with Linux as well, and have compiled a few internal software projects on Linux as well as Free/OpenBSD.
In my projects, I currently only use Qt functionality that is present in the QtCore module, as such, I need to link against libQtCore.4.so on Linux and QtCore4.dll on Windows. This works fine on Windows/Linux, no problems.
I have since moved on to OSX, and I'm having a hard time, mostly because I'm confused about the .dylib libraries that Qt produces there. Or, better, I'm confused about the .dylib concept in general.
I compiled Qt from source, with the "-no-framework" option, as I was hoping that this would yield a libQtCore.4.so file. No such luck however, as it only generates a libQtCore.4.dylib file.
Consequently, the linker complains:
ld: library not found for -lQtCore
At this point I am unsure as to whether Qt supplies .so files at all? So I suppose my questions would be:
* Can I compile Qt on OS X so that it generates .so files?
* If so, can I still create a GUI-based app just linking against those .so files?
* If I can't, then how do I link against those .dylib files with g++ / ld?
* Can I link against .so and .dylib files at the same time?
I've been unsuccessful with this for several hours now, and any help and pointers to the right direction would be appreciated.
/IJFK.
I have been battling with compiling a test C++ application on OS X, v10.6 "Snow Leopard". We're mostly Windows developers, though we have experience with Linux as well, and have compiled a few internal software projects on Linux as well as Free/OpenBSD.
In my projects, I currently only use Qt functionality that is present in the QtCore module, as such, I need to link against libQtCore.4.so on Linux and QtCore4.dll on Windows. This works fine on Windows/Linux, no problems.
I have since moved on to OSX, and I'm having a hard time, mostly because I'm confused about the .dylib libraries that Qt produces there. Or, better, I'm confused about the .dylib concept in general.
I compiled Qt from source, with the "-no-framework" option, as I was hoping that this would yield a libQtCore.4.so file. No such luck however, as it only generates a libQtCore.4.dylib file.
Consequently, the linker complains:
ld: library not found for -lQtCore
At this point I am unsure as to whether Qt supplies .so files at all? So I suppose my questions would be:
* Can I compile Qt on OS X so that it generates .so files?
* If so, can I still create a GUI-based app just linking against those .so files?
* If I can't, then how do I link against those .dylib files with g++ / ld?
* Can I link against .so and .dylib files at the same time?
I've been unsuccessful with this for several hours now, and any help and pointers to the right direction would be appreciated.
/IJFK.