This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile shared lib (g++)  RSS feed

 
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?
 
See where your hand is? Not there. It's next to this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!