1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Solaris cc compilation problem

Discussion in 'C' started by saravanan_, Jan 21, 2008.

  1. saravanan_

    saravanan_ New Member

    Hi,
    Pls, help in solving the problem,
    I am working in solaris 8, using "cc" compiler for c.
    I am trying to compile ".c" file using "cc" compiler.
    I am getting the following error,
    cc: illegal suffix of output filename

    Thanks in advance.......
     
  2. Salem

    Salem New Member

    So what command line / makefile are you using?
     
  3. saravanan_

    saravanan_ New Member

    /opt/SUNWspro/WS6U2/bin/cc -compat=5 -I/usr/local/include
    -I/cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/DB/include
    -I/cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Common/inc
    -I/cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/Common/inc
    -I/user1/oracle9i/app/oracle/product/9.0.1/rdbms/demo
    -I/user1/oracle9i/app/oracle/product/9.0.1/rdbms/public
    -I/user1/oracle9i/app/oracle/product/9.0.1/plsql/public -I/cm_data/mds_hss/mds/oam/common/include
    -I/cm_data/mds_hss/mds/oam/oam_api/include
    -I/cm_data/mds_hss/mds/mds_sp/Common/inc
    -I/cm_data/mds_hss/mds/oam/common/src -I/cm_data/mds_hss/mds/oam/logger/include
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/Common/lib/MdsspAdapterAPI_C.o
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/Common/lib/ResourceFile_C.o
    /cm_data/mds_hss/mds/oam/oam_api/lib/af_for_write.a
    /user1/oracle9i/app/oracle/product/9.0.1/lib/libclntsh.so
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/Common/lib/logger_GUI.a
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/DB/lib/DBAdapter.o
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/DB/src/DBAdapter_Main.c -o
    /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/DB/bin/MdsspDBAdapter -ldl
    -lm -lz -ptv -lsocket -lnsl -lrt

    *** Error code 1
     
  4. Salem

    Salem New Member

    On the face of it, it's complaining about the
    -o /cm_data/mds_hss/mds/mds_sp/OssNeWrapper/Oss/Adapter/DB/bin/MdsspDBAdapter
    part of command line.

    The fact that you're linking directly with .a and .so files (rather than specifying them as libraries like -lz for example) is somewhat odd, but I don't know if that's a real problem for that compiler or not.

    Is this some package you've just downloaded from somewhere, and it doesn't work "out of the box", or is it something you've been working on for many months and it's suddenly stopped working?
     
  5. saravanan_

    saravanan_ New Member

    First Thanks Salem.....for the reply

    that is the archive logger_GUI.a file which i have created........
    Is that a problem ......... to .a directly.....
    it is working for gcc Salem......
    Where can i get complete description about the compiler and its dependencies ......
    Thanks in advance........
     
  6. Salem

    Salem New Member

    > Where can i get complete description about the compiler and its dependencies
    I'm guessing http://www.sun.com/

    Or maybe type
    man cc
    at the command prompt,

    Or maybe it's in the pretty manual pages which are (IIRC) called answerbook.

    > that is the archive logger_GUI.a file which i have created........
    > Is that a problem ......... to .a directly.....
    Maybe - I dunno.
    It might be the case that you get the whole library "as is", whereas if specified using -l, you only get the part of the library you actually need.

    > it is working for gcc Salem
    So it's just a "how do I drive my compiler" question then?

    Basically, we're both at the same point (neither of us have read the manual). But it's going to be a lot better if you read it rather than me.
     
  7. saravanan_

    saravanan_ New Member

    Thanks for teh reply Salem.......
    I will go through the "cc" user manual ........
     

Share This Page