Compile generate 0 byte files on OS X
-
Here I am again with some news, I have successfully built a basic project that includes ODA library, so I did the same operation with the same include files on the real project but it still generate me empty files.
I have compared both .pro file and I have notice that may be the source of the error :target.path = /usr/lib INSTALLS += target
It's the only thing that is different between the project that works and the real project. I have tried to change the target but nothing happens, am I missing something ?
-
Try change
target
for some other name.my_target
should do it. -
I just realizze that I spoke too fast, my other project was working but it was to generate a .app not a lib...
I retried to create a lib step by step :
-create a lib project -> works
-add include path to ODA library to the project -> works
-use a variable of ODA -> error above
-add libstdc++ to qmake -> generate empty files
So the problem comes from either ODA or libstdc++, I will continue to search the solution -
Is ODA built against the old C++ library ?
-
I don't know, the package is named "Teigha_macOsX_x64_10.11" and the mac is in 64bit on OS X 10.11. I will ask in the ODA forum to know
Edit : I can generate some files now ! I change qmake argument to CFLAGS="-arch x86_64" but at a certain point it generate me the error above. -
The best would be to ensure what were the parameters used to build that library. It's surprising if they don't use
libc++
. -
I have made a test with the command "file" to know what kind of library is it, here are my results :
a random lib in /usr/lib :
Mach-0 universal binary with 2 architectures (for architecture x68_64): Mach-0 64-bit dynamically linked shared library x86_64 (for architecture i386): Mach-0 dynamically linked shared library i386
a lib from ODA :
current ar archive random library
I'm not sure of what it means, the library is not compatible with the Mac ?
-
I have made a test with the command "file" to know what kind of library is it, here are my results :
a random lib in /usr/lib :
Mach-0 universal binary with 2 architectures (for architecture x68_64): Mach-0 64-bit dynamically linked shared library x86_64 (for architecture i386): Mach-0 dynamically linked shared library i386
a lib from ODA :
current ar archive random library
I'm not sure of what it means, the library is not compatible with the Mac ?
-
I use that ODA library on OSX and I link it with the c library like this...
LIBS += -lc++ \
-lTD_Db \
... other ODA libsand it works fine.
-
Strange… You should have had undefined symbols errors…
In any case it should rather be:
LIBS += -framework CoreFoundation