From: Marcel R. <ru...@sw...> - 2002-04-13 09:20:12
|
Hi Curt, i think we are mailing in a circle now :-) Probably you need to test your code snippets locally as our development cycle (you code - i test - send email - you code ...) is a bit inefficient. The current result is for example: gcc -Wl,-L /opt/local/mico/lib -Wl,-lmico2.3.7 -Wl,-lmicocoss2.3.7 -Wl,-L /opt/local/xerces-c-src1_7_0/lib -Wl,-lxerces-c1_7_0 -Wl,-L /home/xmlblast/xmlBlaster/lib -Wl,-lxmlBlasterClient -Wl,-L /lib -Wl,-ldl -o TestGet ../../../build/obj/TestGet.o we don't need to pass -L or -l with a -WL in front just -L or -l is correct. This is how a correct output looks like imho: -------------------------------------------------------------- g++ -g -Wall -Wl,-rpath=/home/xy/lib -L/home/xy/lib -lxmlBlasterClient -lld -lstdc++ TestGet.o -o TestGet -------------------------------------------------------------- The '-L ' is not necessary, since i just found out that -L/bla is OK as well. The -rpath needs the -Wl The other options don't want it. The libs libld.so and libstdc++.so are in well known locations where as libxmlBlasterClient.so needs the -L and -Wl,-rpath options to be found (without LD_LIBRARY_PATH). >>>3) On linking you should never use 'ld' directly, use >>>'gcc' instead (using ld can lead to subtle runtime bugs on Linux). >>> > > Thanks for the pointer. I'll still use ld for the version info, but I'll > use gcc for the link step. Any <linkerarg>, I'll auto-decorate with "-Wl,". No, see above. > > >>>4) There is no gap allowed after -l >>> >>> >>> so we can choose e.g. >>> >>> sep[0]=""; sep[1]="="; and sep[2]=" "; .., >>> > > The Ant Execute task will wrap any command line argument with an embedded > space in quotes to take care of scenarios where there is a path name with > spaces. There isn't a clean way around it, so if you want a space between > "-L" and directory name, you need to pass them as two successive command > line arguments. Resolved, i just found out that -L works without ' ' as well! thanks Marcel -- Marcel Ruff mailto:ru...@sw... http://www.lake.de/home/lake/swand/ http://www.xmlBlaster.org |