>>>>> ALPESH KOTHARI writes:

    ALPESH> I am trying to integrate the java and C code. i am
    ALPESH> following the guidelines given in the documentation at the
    ALPESH> address
    ALPESH> http://java.sun.com/docs/books/tutorial/native1.1/stepbystep. I
    ALPESH> am trying to work with the sample program given by them. I
    ALPESH> am having RedHat6.0 with JDK1.2 (glibc2.1) which is
    ALPESH> working fine. I am able to prepare the object file of the
    ALPESH> given C code. but when I try to prepare *.so file it
    ALPESH> enconters following error:

    ALPESH> #g++ -dy -o libhello.so HelloWorldImp.o
    ALPESH> /usr/lib/crt1.o(text+0x18):undefined reference to 'main'
    ALPESH> collect2:ld returned exit status

    ALPESH> and it terminates.  If any one of u have came across such
    ALPESH> error please help me. in /usr/lib crt1.o is present.

Try 'g++ -shared -o libhello.so HelloWorldImp.o'.


        Juergen


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to