Miscellaneous > Programming & Networking
C Q
Kintaro:
it seems to have given me this
quote:
[X11@X11 X11]$ vi blah.cpp
[X11@X11 X11]$ gcc -o blah blah.cpp
In file included from /usr/include/c++/3.2/backward/iostream.h:31,
from blah.cpp:1:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using
one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
/tmp/ccXRbBiD.o: In function `main':
/tmp/ccXRbBiD.o(.text+0x63): undefined reference to `std::cout'
/tmp/ccXRbBiD.o(.text+0x68): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std: :o perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccXRbBiD.o(.text+0x83): undefined reference to `std::cout'
/tmp/ccXRbBiD.o(.text+0x88): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std: :o perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccXRbBiD.o(.text+0x98): undefined reference to `std::cout'
/tmp/ccXRbBiD.o(.text+0x9d): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std: :o perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccXRbBiD.o(.text+0xaf): undefined reference to `std::cout'
/tmp/ccXRbBiD.o(.text+0xb4): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std: :o perator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccXRbBiD.o: In function `__static_initialization_and_destruction_0(int, int)':
/tmp/ccXRbBiD.o(.text+0xe0): undefined reference to `std::ios_base::Init::Init[in-charge]()'
/tmp/ccXRbBiD.o: In function `__tcf_0':
/tmp/ccXRbBiD.o(.text+0x10f): undefined reference to `std::ios_base::Init::~Init [in-charge]()'
/tmp/ccXRbBiD.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
--- End quote ---
[ November 09, 2002: Message edited by: Calum & his insidious little spies ]
choasforages:
type g++ instead of gcc
it goes like this
g++ -o blah blah.cpp -lpthreads
[ November 09, 2002: Message edited by: choasforages ]
choasforages:
hehehe, got it to work but its probably not that portable, and i used a little bit of help with the usage of ioctl's. if you were to use only ncurses, it would probably end up being better ill try it later but here is that exakmple that works.
compile it with
g++ -o blah blah.cpp -lpthreads
--- Code: ---
--- End code ---
Kintaro:
Its still not working :(
Heres the error output:
quote:
[X11@X11 X11]$ g++ -o blah blah.cpp -lpthreads
In file included from /usr/include/c++/3.2/backward/iostream.h:31,
from blah.cpp:1:
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using
one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
/usr/bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
--- End quote ---
[ November 10, 2002: Message edited by: Ex Eleven / b0b 2.1 ]
choasforages:
ooops, i feel stupid its
g++ -o blah blah.cpp -lpthread
extra s on the -lpthread was fooking it up
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version