This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Sorry for the inconvenience, new installed mailer ...
I've got a linking problem. Referencing a native C++ method in an shared library
causes this error:
gcj -O0 -g --main=de.dbt.simplelibclient.SimpleCPPLib
de/dbt/simplelibclient/SimpleCPPLib.o -oDebug/SimpleLibClient -LDebug
-L/home/andreas/develop/projects/SimpleCPPLib/Debug -L../SimpleCPPLib/Debug
-lSimpleCPPLib -lgcj
de/dbt/simplelibclient/SimpleCPPLib.o:(.data+0xc): undefined reference to
`hidden alias for de::dbt::simplelibclient::SimpleCPPLib::square(int)'
de/dbt/simplelibclient/SimpleCPPLib.o:(.data+0x68): undefined reference to
`hidden alias for de::dbt::simplelibclient::SimpleCPPLib::square(int)'
collect2: ld returned 1 exit status
I've attached the example C++ lib and the Java class using the lib. Just unpack
the archive simplecpplib_sample.tar.bz2 in an empty dir and run "build.sh".
My platform:
- gcj version: 4.1.2 20061115
- binutils version: 2.17.50.0.5 20060927
- OS: openSUSE 10.2, Linux kernel 2.6.18.2-34-default
- glibc version: 2.5 (20061011)
I took into consideration doing something really stupid, but I don't see it.
Thanks in advance for any help.
--
Mit freundlichen Grueszen, / With kind regards,
Andreas Bürgel
Diplom-Informatiker (Ingenieur-Informatik)
Software-Engineer/-Architect
http://www.andreas-buergel.de/profile.html
Unbedingt lesenswerte Site:
http://www.nachdenkseiten.de
Entia non sunt multiplicanda sine necessitate.
-- William of Ockham
Attachment:
simplecpplib_sample.tar.bz2
Description: application/bzip
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |