STL Not working in 6.2

Hi,

I have just installed 6.2 and all the development stuff from the
repository. I am trying now to compile our software that was developed
under 6.1, but the STL seems not to be configured. For example,

file a.cc

#include

int main ( void ) {

list L;

L->push_back(1);

}

compiling this with

g++ a.cc

gives the error

a.cc:1: list: No such file or directory

However, the directory

/usr/include/g+±3/

and all of its usual contents are there.

Please help – must get working today for 20 person workshop!

-eric

Try using either “QCC” or “qcc -lang-c++” and let me know.

cheers,

Kris

“Eric Klavins” <klavins@caltech.edu> wrote in message
news:3E2316BA.C96066E1@caltech.edu

Hi,

I have just installed 6.2 and all the development stuff from the
repository. I am trying now to compile our software that was developed
under 6.1, but the STL seems not to be configured. For example,

file a.cc

#include <list

int main ( void ) {

list L;

L->push_back(1);

}

compiling this with

g++ a.cc

gives the error

a.cc:1: list: No such file or directory

However, the directory

/usr/include/g+±3/

and all of its usual contents are there.

Please help – must get working today for 20 person workshop!

-eric

So I got it to work with g++ but I have to do

-I/usr/include/g+±2 -I/usr/lib/gcc-lib/ntox86/2.95/3/include
-I/usr/ntox86/include

and it works. But this should be built in to g++, right?

With qcc -lang-c++ I can compile the example below (modulo changing “->” to
“.”).

Is qcc calling g++ (or gcc?).


Kris Warkentin wrote:

Try using either “QCC” or “qcc -lang-c++” and let me know.

cheers,

Kris

“Eric Klavins” <> klavins@caltech.edu> > wrote in message
news:> 3E2316BA.C96066E1@caltech.edu> …
Hi,

I have just installed 6.2 and all the development stuff from the
repository. I am trying now to compile our software that was developed
under 6.1, but the STL seems not to be configured. For example,

file a.cc

#include <list

int main ( void ) {

list L;

L->push_back(1);

}

compiling this with

g++ a.cc

gives the error

a.cc:1: list: No such file or directory

However, the directory

/usr/include/g+±3/

and all of its usual contents are there.

Please help – must get working today for 20 person workshop!

-eric

-I/usr/include/g+±2 -I/usr/lib/gcc-lib/ntox86/2.95/3/include
-I/usr/ntox86/include

and it works. But this should be built in to g++, right?

With qcc -lang-c++ I can compile the example below (modulo changing “->” to
“.”).

Is qcc calling g++ (or gcc?).

No. g++, gcc, qcc, and QCC are known as “drivers” for the real backend
binaries (cc1, cc1plus, collect2, cpp0, ld, …) that do the work. The
qcc/QCC drivers are ours that can, in theory, be used to target different
back-end compiler systems and configs. Right now they are used for switching
CPU targets and C++ libs (using the -V option).

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Eric Klavins <klavins@caltech.edu> wrote:

under 6.1, but the STL seems not to be configured. For example,

Your example shouldn’t compile, see below.

list L;

list is in namespace std, so this must read

std::list< int > L ;

L->push_back(1);

Your L is not a pointer, this should read

L.push_back( 1 ) ;

Best regards,
-Gerhard (C++ veteran; new to QNX)

| voice: +43 (0)676 6253725 *** web: http://www.cosy.sbg.ac.at/~gwesp/
|
| Passts auf, seid’s vuasichdig, und lossds eich nix gfoin!
| – Dr. Kurt Ostbahn