Re: Proglem making a lib for JNI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, Jun 5, 2011 at 11:03 AM, Robert M7654 <rmetcalf9@xxxxxxxxxxxxxx> wrote:
>
>
> Firstly I am not sure the lib file is actually a lib file. I create it as
> follows:
>
>        g++ -c SM_Backend.cpp -o SM_Backend.obj -fPIC -shared
>
>        ...(More lines like above for each cpp)...
>        ar cq SM_Backend.lib /SM_Backend.obj
>        ...(More lines like above for each obj)...
>
>
I am not sure what -shared does when used with -c?

I *think* you want something like:

g++ -c -fPIC <blahx.cpp> <blahy.cpp> ...
g++ -shared -oloibSM_Backend.so blahx.o blahy.o ...

kevin



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux