This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Raymund: Did you try adding a -lstdc++ to the gcc command line, after the main.cpp? $ arm-elf-gcc main.cpp -lstdc++ b.g. On Tue, Jun 18, 2002 at 06:56:00PM +0100, info2@raygmbh.de wrote: > gcc-3.1 or gcc-2.95.3 > newlib-1.10.0 > binutils-2.11.2 > > Host: cygwin > Target: arm-elf > > I seemed to have success building a toolset with gcc 2.95.3 according to > bill gatliffs "Getting Started with GNU" article. I only had ot edit a > makefile in the build tree - adding a include path - because some step tried > to include "windows.h". > After this gcc 2.95.3 seemed to work with C++ (as in example below). > > Then I tried the same thing with gcc 3.1. I had the same "windows.h" problem > and also edited a header file in the src tree "std_cstdlib.h". I commented > some "using" directives out (using ::div_t, using ::ldiv_t, etc.) and a > inline func "div". I did this without knowing much about what I actually was > doing. > > After this the complete cross compiler built without error. > > But gcc-3.1 seems to have some problem with c++: > > When i compile the simple: > > > main.cpp: > > > #include <stdio.h> > #include <new> > > int main( char **argv, int argc ) > { > char * array = new char [500]; > printf("hallo konsens!\n"); > } > > > $ arm-elf-gcc main.cpp > > > I get: > > > /tmp/cc28ki7u.o: In function `main': > /tmp/cc28ki7u.o(.text+0x1c): undefined reference to `operator new[](unsigned > long)' > collect2: ld returned 1 exit status > > > > So I suspect something went wrong when building libgcc.a which should > contain this reference. Or maybe something completely different... > > I would like to use gcc-3.1, because 2.95.3 has problems with my project and > it's templates but gcc-3.1 has not. > > Raymund Hofmann > > > ------ > Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com > -- Bill Gatliff bgat@billgatliff.com ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |