Dynamic library compile error (no symbol)

OSX 2009. 12. 9. 19:48

"_main", referenced from: start in crt1.10.5.o

export MACOSX_DEPLOYMENT_TARGET=10.4 ; unset LD_PREBIND ; g++ -dynamiclib -undefined dynamic_lookup -single_module -o libBla.dylib *.o

mach-o 타입 다이나믹 라이브러리 컴파일시 아래와 같은 에러가 발생하면 당황하시지 마시고 -dynamiclib CCFLAG에다 세워주시면 해결!!

Undefined symbols:

"_main", referenced from:

start in crt1.10.5.o

ld: symbol(s) not found

you can find more at

<http://developer.apple.com/documentation/DeveloperTools/Conceptual/DynamicLibraries/Articles/CreatingDynamicLibraries.html#//apple_ref/doc/uid/TP40002073>

or something like : g++ -dynamiclib -o libBla.dylib *.o

: