I wrote a program, which needs to be tested in Linux, Windows and Solaris. The first two were easy, but Solaris has been very troublesome. I don't have g++ in the Solaris machine I'm running those tests, so I'm stuck with cc
.
So, I first tried:
cc -g -o transfer transfer.cpp -lcurl
and the output was:
ld: fatal: file transfer.cpp : unknown file type
ld: fatal: no output written to transfer
If someone knows any other native C++
compiler for Solaris
, please let me know, and I will give it shot. I went to Oracle Solaris website, and they said they support .cpp
files in cc
. Could someone please help me with that?
Thanks
It's CC
for C++
, not cc
. So, if you want to compile C++
in solaris do
CC -g -o [output] [filename] [libraries]
for C
do:
cc -g -o [output] [filename] [libraries]
please pay attention of the upper case letters!
The Solaris (Sun) C++ compiler is CC
(note capitals). Also note that it tends to be less standards conforming that some other compilers so your code may or may not still compile. You can improve standard library conformance with -library=stlport4
though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With