| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Apr 13, 2011
Posts: 2
![]() |
Hi,
I have to create two dynamic libraries from two projects 'basic' and 'lia', where lia depends upon basic. I have created and used both successfully on linux, but when I try to compile the same on mac it creates an issue. --------- Linux Here are the commands that my makefile generates g++ -m64 -Wl,-O1 -shared -o libbasic.so obj/arg.o obj/basic.o obj/cb.o obj/cb_doprnt.o obj/counter.o obj/files.o obj/getarg.o obj/isort.o obj/istaque.o obj/malloc.o obj/math2.o obj/prime.o obj/qsort.o obj/time.o obj/tokenize.o obj/uhash.o -L/usr/lib64 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib64 -pthread -lpng -lfreetype -lSM -lICE -pthread -pthread -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread mv -f libbasic.so ../lib.linux64/ g++ -m64 -Wl,-O1 -shared -o liblia.so obj/aux.o obj/chars.o obj/det.o obj/lia.o obj/pool.o obj/stack.o obj/test.o -L/usr/lib64 -lQtGui -L/usr/lib64 -L/usr/X11R6/lib64 -pthread -lpng -lfreetype -lSM -lICE -pthread -pthread -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread mv -f liblia.so ../lib.linux64/ -------------- MAC When I try to compile on mac, basic goes fine. But in linking of lia, it throws a linking error. g++ -headerpad_max_install_names -single_module -dynamiclib -o liblia.dylib obj/aux.o obj/chars.o obj/det.o obj/lia.o obj/pool.o obj/stack.o obj/test.o -F/Library/Frameworks -L/Library/Frameworks -framework QtGui -framework QtCore Undefined symbols: "_basic_error", referenced from: _lia_maximum in aux.o ... _test1 in test.o "_basic_ipower", referenced from: _lia_ffpload in aux.o "_basic_malloc", referenced from: _lia_strload in aux.o ... _lia_push in stack.o "_basic_strip", referenced from: _main in test.o ..... (and many more) Thus, all the functions in 'basic' go unlinked. Could someone illuminate the difference between linux and max wrt this ? Why do i need 'basic' lib to create 'lia' lib on mac ? |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| A Switchers guide to recommended free Apps to download to your new Mac | the8thark | Switcher Hangout | 67 | 03-19-2013 10:48 AM |
| Data Partition: Using a FAT32 Partition to exchange data between Mac and Windows XP | MartinT | Running Windows (or anything else) on your Mac | 9 | 11-12-2009 02:56 AM |
| Running Windows on Mac | rickmahmoud | Running Windows (or anything else) on your Mac | 7 | 02-16-2008 11:31 PM |
| Mac Users Get More ISP Choices | schweb | Apple Rumors and Reports | 1 | 03-06-2003 10:57 AM |
All times are GMT -4. The time now is 07:35 AM.
Powered by vBulletin