• Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile shared lib (g++)  RSS feed

 
Georgy Bolyuba
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I wrote shared library for JNI in C-style and compile it using command line:
gcc -o libfile.so -shared file.c
(I'm talking about Linux 2.4.x)

When tried make it in C++-style (add extern "C" to each function name)
and used command line

g++ -o libfile.so -shared file.c

After start java print error - "unknown symbol in libgile.so ..."

Do I need any other command line arguments?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!