ts-7000
[Top] [All Lists]

[ts-7000] Unable to compile C++ Hello World with Cygwin Cross Compiler

To:
Subject: [ts-7000] Unable to compile C++ Hello World with Cygwin Cross Compiler
From: "geoffveale" <>
Date: Fri, 01 Jun 2007 10:27:26 -0000
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/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU