Tytuł: Hacking :: C/C++ std lib problem

Dodane przez kevinmanuel dnia 20-04-2018 11:58
#1

HI,

I am trying to get the raspberry pi tool chain up and running with a simple hello world program but I have hit a problem. I have downloaded /github.com/raspberrypi/tools and plan on using a the compiler /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin as I am cross compiling on a 64 bit unbuntu 16.04 LTS.
I am using a bash script to set up PATH to point to the compiler and invoke a MakeFile. This is working but when I include std out object from iostream I get the following errors:
arm-linux-gnueabihf-gcc -o hw helloworld.o
helloworld In function `main':
helloworld.cpp.text+0x1c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >&operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
I assume this is because standard c library is separate from gcc. My question is where do I get this lib from? Is part of the tools directory structure ?


Please help.

I didn't find the right solution from the Internet.

References:
https://www.raspberrypi.org/forums/viewtopic.php?t=184443
Creative infographic design agency

Thanks!