Hi Stephan,
On 08/28/08 18:32, Pierre Doyon wrote:
Hi,
The undefined symbols come from the following warnings
ld: warning can't open dynamic library: @loader_path/
libuno_sal.dylib.3 referenced from: /Users/pdoyon/
OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: warning can't open dynamic library: @loader_path/
libuno_salhelpergcc3.dylib.3 referenced from: /Users/pdoyon/
OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: warning can't open dynamic library: @loader_path/
libuno_cppu.dylib.3 referenced from: /Users/pdoyon/
OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: Undefined symbols:
Can you quote the complete gcc command line that outputs the above
ld errors?
-Stephan
Here is the complete gcc command:
gcc -malign-natural -c -O -fPIC -fno-common -I. -I/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/inc -I/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/inc/examples -I../../../../
include -I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/
CppComponentSample -DUNX -DGCC -DMACOSX -DCPPU_ENV=gcc3 -
DGXX_INCLUDE_PATH=/usr/include/c++/4.0.0 -o/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/
service1_impl.o service1_impl.cxx
mkdir -p /Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/
CppComponentSample
gcc -malign-natural -c -O -fPIC -fno-common -I. -I/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/inc -I/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/inc/examples -I../../../../
include -I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/
CppComponentSample -DUNX -DGCC -DMACOSX -DCPPU_ENV=gcc3 -
DGXX_INCLUDE_PATH=/usr/include/c++/4.0.0 -o/Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/
service2_impl.o service2_impl.cxx
Here is the g++ command:
g++ -dynamiclib -single_module -Wl,-multiply_defined,suppress -Wl,-
exported_symbols_list /Users/pdoyon/OpenOffice.org3.0_SDK/
MACOSXexample.out/misc/CppComponentSample/CppComponent.uno.map -L/
Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/lib -L/Users/
pdoyon/OpenOffice.org3.0_SDK/macosx/lib -L"/Applications/
OpenOffice.org.app/Contents/basis-link/ure-link/lib" -o /Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/lib/CppComponent.uno.dylib /
Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/
CppComponentSample/service1_impl.o /Users/pdoyon/
OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/
service2_impl.o \
-luno_cppuhelpergcc3 -luno_cppu -luno_sal -Wl,-
dylib_file,@__________________________________________________URELIB/
libuno_cppuhelpergcc3.dylib.3:/Applications/OpenOffice.org.app/
Contents/basis-link/ure-link/lib/libuno_cppuhelpergcc3.dylib -Wl,-
dylib_file,@__________________________________________________URELIB/
libuno_cppu.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-
link/ure-link/lib/libuno_cppu.dylib -Wl,-
dylib_file,@__________________________________________________URELIB/
libuno_sal.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-
link/ure-link/lib/libuno_sal.dylib
Best Regards
Pierre