Menu

Need help compiling using minGW

c911
2013-06-18
2013-06-28
  • c911

    c911 - 2013-06-18

    Please help. I am unable to find anything on this forum or the manual regarding compiling via command line using minGW.

    I unzip the oci zip file to /c/ocilib
    I added /c/ocilib/include and /c/ocilib/lib32 to my path
    I copy ociliba.lib to ociliba.a

    Issue: the following command to compile the conn.c demo file and get the following error:

    gcc -I/c/ocilib/include/ -L/c/ocilib/lib32/ c/ocilib/lib32/libociliba.a conn.c -o conn

    C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0x26): undefined reference to OCI_Initialize' C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0x58): undefined reference toOCI_ConnectionCreate'
    C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0x68): undefined reference to OCI_GetServerMajorVersion' C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0x84): undefined reference toOCI_GetServerMinorVersion'
    C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0xa0): undefined reference to OCI_GetServerRevisionVersion' C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0xbc): undefined reference toOCI_GetVersionConnection'
    C:\Users\AppData\Local\Temp\ccSaLBKQ.o:conn.c:(.text+0xd1): undefined reference to `OCI_Cleanup'
    collect2: ld returned 1 exit status

     

    Last edit: c911 2013-06-18
  • c911

    c911 - 2013-06-28

    ok. I finally figured out.

    I just use the codeblock IDE now. I opened the proj folder for MinGW and use that as a sample. It is working now.

    Thanks all.

     
  • c911

    c911 - 2013-06-28

    ok. I finally figured out.

    I just use the codeblock IDE now. I opened the proj folder for MinGW and use that as a sample. It is working now.

    Thanks all.