Apparent C++ problems

Peter Naulls peter at chocky.org
Fri Dec 28 09:17:36 PST 2001


In message <4af0099478dbennett2 at ntlworld.com>
          Dave Bennett <dbennett2 at ntlworld.com> wrote:

[ Please try and use a subject in future]

> I have already hit a couple of problems with the new 2_95_4 C++ compiler.
> 
> When I compile the printf version of the "Hello, world" program using the
> default option of unixlib, all is well.  However if I try to compile using
> the -mlibscl option, I get a number of lines in stdio.h flagged because
> "__gnuc_va_list" is not being defined.

You must be doing something odd:


*gcc -mlibscl hellow.c -v
Using builtin specs.
gcc version 2.95.4 20010319 (prerelease) [gccsdk 20010912]
 gccpkg:bin/arm-riscos-aof/2_95_4/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -Darm -Driscos -D__arm__ -D__riscos__ -D__arm -D__riscos -Asystem(riscos) -Acpu(arm) -Amachine(acorn) -D__CHAR_UNSIGNED__ -D__ARM_ARCH_2__ -D__APCS_26__ -D__JMP_BUF_SIZE=24 -D__TARGET_SCL__ -icrossdirafter /libscl hellow.c /tmp/ccO5dvgb.i
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: GNU CPP version 2.95.4 20010319 (prerelease) [gccsdk 20010912] (ARM/RISC OS with AOF)
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: ignoring nonexistent directory `gccpkg:local/include'
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: ignoring nonexistent directory `gccpkg:sys/include'
#include "..." search starts here:
#include <...> search starts here:
 gccpkg:lib/gcc-lib/arm-riscos-aof/2_95_4/include
 gccpkg:include/libscl
End of search list.
 gccpkg:bin/arm-riscos-aof/2_95_4/cc1 /tmp/ccO5dvgb.i -quiet -dumpbase hellow.c -mlibscl -version -o /tmp/cc70hQmc.s
GNU C version 2.95.4 20010319 (prerelease) [gccsdk 20010912] (arm-riscos-aof) compiled by GNU C version 2.95.4 20010319 (prerelease) [gccsdk 20010912].
 gccpkg:bin/arm-riscos-aof/2_95_4/as -o /tmp/ccpWlbtd.o /tmp/cc70hQmc.s
 gccpkg:bin/arm-riscos-aof/2_95_4/ld -Lgccpkg:bin/arm-riscos-aof/2_95_4/apcs26/libscl -Lgccpkg:bin/arm-riscos-aof/2_95_4 /tmp/ccpWlbtd.o -lgcc -lscl -lgcc

> Secondly, when I try to compile the iostream version of the "Hello, world"
> program (using the default option of unixlib), the link editor fails to
> resolve the "cout" and "<<" references.  I've tried adding the -liostream
> option which I used to use with 2_95_1, but this just gives a "libiostream
> not found" error.  Am I missing a library file or do I just need to
> specify a different parameter?

You must be doing something strange here too:


*gcc helloworld.cc -liostream -v
Using builtin specs.
gcc version 2.95.4 20010319 (prerelease) [gccsdk 20010912]
 gccpkg:bin/arm-riscos-aof/2_95_4/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Darm -Driscos -D__arm__ -D__riscos__ -D__arm -D__riscos -Asystem(riscos) -Acpu(arm) -Amachine(acorn) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D__ARM_ARCH_2__ -D__APCS_26__ -D__JMP_BUF_SIZE=24 -icrossdirafter /unixlib helloworld.cc /tmp/cc50vvgb.ii
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: GNU CPP version 2.95.4 20010319 (prerelease) [gccsdk 20010912] (ARM/RISC OS with AOF)
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: ignoring nonexistent directory `gccpkg:local/include'
gccpkg:bin.arm-riscos-aof.2_95_4.cpp: ignoring nonexistent directory `gccpkg:sys/include'
#include "..." search starts here:
#include <...> search starts here:
 gccpkg:lib/gcc-lib/arm-riscos-aof/2_95_4/include/g++-3
 gccpkg:lib/gcc-lib/arm-riscos-aof/2_95_4/include
 gccpkg:include/unixlib
End of search list.
 gccpkg:bin/arm-riscos-aof/2_95_4/cc1plus /tmp/cc50vvgb.ii -quiet -dumpbase helloworld.cc -version -o /tmp/ccXRRQmc.s
GNU C++ version 2.95.4 20010319 (prerelease) [gccsdk 20010912] (arm-riscos-aof) compiled by GNU C version 2.95.4 20010319 (prerelease) [gccsdk 20010912].
 gccpkg:bin/arm-riscos-aof/2_95_4/as -o /tmp/ccMIdctd.o /tmp/ccXRRQmc.s
 gccpkg:bin/arm-riscos-aof/2_95_4/ld -Lgccpkg:bin/arm-riscos-aof/2_95_4/apcs26/unixlib -Lgccpkg:bin/arm-riscos-aof/2_95_4 /tmp/ccMIdctd.o -liostream -lgcc -lunixlib -lgcc

Peter

-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 RISC OS Projects Initiative  -  http://www.chocky.org/initiative/
 Java for RISC OS and ARM     -  http://www.chocky.org/java/
 Debian Linux on RiscPCs      -  http://www.chocky.org/debian/
------------------------------------------------------------------------



More information about the gcc mailing list