How to create and load shared libraries in fedora 7 for Java as frontend and C as backend

We are doing project for which we want Java as frontend and backend is C.
We are using JNI to link Java and C but we are not getting which commands are used to link and create shared libraries in fedora7?

We referred this link for JNI
http://www.iut-info.univ-lille1.fr/docs/tutorial/native1.1/stepbystep/index.html

gcc?

we tried gcc but its not working.

the syntax in solaris is given by
cc -G -I/usr/local/java/include -I/usr/local/java/include/solaris \
HelloWorldImp.c -o libhello.so

we want for fedora 7
fedora 7 is giving error for -G and -I

Because that is cc and not gcc. Read the documentation for the two, figure out what those two options are in cc and use the corresponding options in gcc, and make sure the paths are correct.

I read the documentation for both.
-G : Produces a shared object
-I : changes the include-file search rules
-Idir : adds dir to the list of directories that are
searched for #include files.

which in fedora correspond to -shared & -I(-iquote).

its again giving me error .

shared is under linker options and
-Idir/-I are under directory options.

do i need to switch over the linker & directory options?
if so,how to do that?
but manpages for my fedora 7

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.