I have been able to build a range of small applications written in c
code using arm-unknown-linux-gcc without any major problems. This is
under Cygwin with the standard installation as provided by Technologic
Systems for my TS-7260. All was going well until I tried to compile
any c++ code and then I started getting errors that I cannot resolve.
I tried changing to arm-unknown-linux-g++ but the errors stayed the same.
So to try and fix this I went back to basics to see if I could compile
the standard Hello World in c++ as shown below.
#include<iostream>
int main(void)
{
cout << "Hello, world";
return 0;
}
My instruction to compile in my file hello.sh is..
arm-unknown-linux-gnu-g++ -e -I
/opt/crosstool/arm-unknown-linux-gnu/gcc-3.3.2-glibc-2.3.2/arm-unknown-linux-gnu/include
-Wall hello.cc
The initial problem reported was that file iostream could not be found
so I added the directory where iostream was located after the -I
option (see above) when calling the compiler. This fixed the error but
now I get the error 'cout' undeclared. This has me confused because
the other files c++ header files istream, ostream etc. are all in the
same directory and should define 'cout'? I have not been able to
overcome this error. Anyone have a suggestion?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|