Re: building shared libraries for native

1998-05-26 Thread Duncan Roe
Hi Craig, "info gcc" describes this better. It states that FPIC only makes a difference on the m68k, m88k and the Sparc. N.b. use info! It is kept up to date, while the man page (sometimes) isn't. There was some discussion of how shared libraries work without pic, but I remain bemused that they

Re: building shared libraries for native

1998-05-26 Thread B. Craig Taverner
>in ".o". Example:gcc -fPIC -c -I file1.c -o Based solely on looking at other peoples makefiles and code, I've been using -fpic under linux and -fPIC under solaris. The gcc man pages say the following: -fpic If supported for the target machines, generate po sitio

Re: building shared libraries for native

1998-05-23 Thread Ed Roskos
I've written a few shared libraries for use under both Linux and Solaris, and since a few people are curious about this, here goes: 1) Make sure you have run javah. Plenty of documentation on this exists. 2) You must first compile your C source files to object files, which end in ".o". Examp

Re: building shared libraries for native

1998-05-22 Thread Duncan Roe
Hi Craig, No, you don't need to compile with -O to build a shared object. But you *do* need to compile with -fpic to get position-independent code. Then use -shared when loading the object, as you already do. I have successfully built a number of shared objects using no other special options (fo

Re: building shared libraries for native

1998-05-22 Thread Felix Morley Finch
>>In article <[EMAIL PROTECTED]>, Craig E Rasmussen ><[EMAIL PROTECTED]> writes: > I'm having trouble getting native calls to work. I'm using JDK-1.1.3 > and the simple HelloWorld example segfaults. My guess is that the > problem is that I'm not creating the shared objects correctly. I'm > us

building shared libraries for native

1998-05-22 Thread Craig E Rasmussen
I'm having trouble getting native calls to work. I'm using JDK-1.1.3 and the simple HelloWorld example segfaults. My guess is that the problem is that I'm not creating the shared objects correctly. I'm using gcc with the -shared option to create an a.out file which I rename to libhello.so. I t