Re: ccc
Falk Hueffner wrote:
Adam C Powell IV <hazelsct@mit.edu> writes:
Aha, I had an identical file minus the -std strict_ansi. But with
those, it gives me compiler errors:
zither:/# cxx /tmp/bye.C -o /tmp/bye
cxx: Error: /tmp/bye.C, line 4: identifier "cout" is undefined
cout << "Hello world" << endl;
--^
cxx: Error: /tmp/bye.C, line 4: identifier "endl" is undefined
cout << "Hello world" << endl;
---------------------------^
cxx: Info: 2 errors detected in the compilation of "/tmp/bye.C".
zither:/# more /tmp/bye.C
#include <iostream>
int main()
{
cout << "Hello world" << endl;
return 0; }
Well, that's a correct message, g++ will tell you the same :)
Really?? Again, I'm not really a C++ person, but have seen this syntax
without std:: lots of times, and it's in the create-comp-config.sh
script provided by cxx. Oh well, must not have been ANSI-compliant
code; I'm happy to have the .deb patch create-comp-config.sh before
running it.
You need std::cout and std::endl. And I think you really need -std
strict_ansi in comp.config to get it to work.
Hmm, just compiled with std::cout and std::endl, and got even more
undefined symbols...
zither:/# cxx /tmp/bye.C -o /tmp/bye
bye.o(.text+0x18): undefined reference to
`__7put__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFZ1Z_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x20): undefined reference to
`__7put__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFZ1Z_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x20): undefined reference to
`__7put__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFZ1Z_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x30): undefined reference to
`__7flush__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFv_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x34): undefined reference to
`__7flush__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFv_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x34): undefined reference to
`__7flush__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFv_RQ2_3std27basic_ostream__tm__7_Z1ZZ2Z'
bye.o(.text+0x70): In function `main':
: undefined reference to
`__7__CPR123____ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1ZPCc_RQ2_3stdJ57J'
bye.o(.text+0x80): In function `main':
: undefined reference to
`__7__CPR123____ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1ZPCc_RQ2_3stdJ57J'
bye.o(.text+0x80): In function `main':
: undefined reference to
`__7__CPR123____ls__tm__30_Q2_3std20char_traits__tm__2_c__3stdFRQ2_3std25basic_ostream__tm__5_cZ1ZPCc_RQ2_3stdJ57J'
bye.o(.text+0x74): In function `main':
: undefined reference to `__7cout__3std'
bye.o(.text+0x90): In function `main':
: undefined reference to
`__7__CPR183____ls__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFPFRQ2_3std27basic_ostream__tm__7_Z1ZZ2Z_RQ2_3stdJ78J_RQ2_3stdJ78J'
bye.o(.text+0x98): In function `main':
: undefined reference to
`__7__CPR183____ls__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFPFRQ2_3std27basic_ostream__tm__7_Z1ZZ2Z_RQ2_3stdJ78J_RQ2_3stdJ78J'
bye.o(.text+0x98): In function `main':
: undefined reference to
`__7__CPR183____ls__Q2_3std52basic_ostream__tm__31_cQ2_3std20char_traits__tm__2_cFPFRQ2_3std27basic_ostream__tm__7_Z1ZZ2Z_RQ2_3stdJ78J_RQ2_3stdJ78J'
Can you tell me the steps you went through to get this installed? I
know you didn't (merely) use the .deb, because that would have put paths
to 2.95.4 in your comp.config.
Thanks for your help!
--
-Adam P.
GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6
Welcome to the best software in the world today cafe!
<http://lyre.mit.edu/%7Epowell/The_Best_Stuff_In_The_World_Today_Cafe.ogg>
Reply to:
- Follow-Ups:
- Re: ccc
- From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
- References:
- ccc
- From: Joakim Roubert <jokke@df.lth.se>
- Re: ccc
- From: Adam C Powell IV <hazelsct@mit.edu>
- Re: ccc
- From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
- Re: ccc
- From: Adam C Powell IV <hazelsct@mit.edu>
- Re: ccc
- From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>