STL Not working in 6.2

bridged with qdn.public.porting
Post Reply
Eric Klavins

STL Not working in 6.2

Post by Eric Klavins » Mon Jan 13, 2003 7:42 pm

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<int> 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

Kris Warkentin

Re: STL Not working in 6.2

Post by Kris Warkentin » Mon Jan 13, 2003 9:36 pm

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<int> 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

Eric Klavins

Re: STL Not working in 6.2

Post by Eric Klavins » Tue Jan 14, 2003 2:11 am

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<int> 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

Chris McKillop

Re: STL Not working in 6.2

Post by Chris McKillop » Tue Jan 14, 2003 5:21 am

-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/

Gerhard Wesp

Re: STL Not working in 6.2

Post by Gerhard Wesp » Tue Jan 28, 2003 4:11 pm

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<int> 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

Post Reply

Return to “qdn.public.porting”