Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Solaris cc compilation problem (http://www.go4expert.com/forums/solaris-cc-compilation-t8363/)

saravanan_ 21Jan2008 12:31

Solaris cc compilation problem
 
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.......

Salem 21Jan2008 14:06

Re: Solaris cc compilation problem
 
So what command line / makefile are you using?

saravanan_ 21Jan2008 14:12

Re: Solaris cc compilation problem
 
/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

Salem 21Jan2008 17:13

Re: Solaris cc compilation problem
 
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?

saravanan_ 21Jan2008 17:33

Re: Solaris cc compilation problem
 
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........

Salem 21Jan2008 21:03

Re: Solaris cc compilation problem
 
> 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.

saravanan_ 22Jan2008 17:48

Re: Solaris cc compilation problem
 
Thanks for teh reply Salem.......
I will go through the "cc" user manual ........


All times are GMT +5.5. The time now is 07:39.