This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why doesn't STL work with gcc 3.2.2?


Brent Phillips <mynekos2000@yahoo.com> writes:

> Hi,
>  
> I'm using a Slackware 9 Linux system, gcc 3.2.2. The
> GNU STL that comes with it seems totally broken - the
> following "Hello World" program breaks horribly:
>  
> #include <stdio.h>
> #include <stdlib.h>
> #include <vector>
> int main(int argc, char** argv)
> {
>   printf("Hello world!\n");
>   exit(0);
> }

This program compiles with no errors using gcc 3.2.1 or gcc 3.3 on
    freebsd, or using gcc 3.2.2 on mandrake linux.

I think your install of either gcc or glibc is incomplete or broken in
    some way.

>  
> A sample of the compiler error output is below (it's
> really long so I didn't include it all here.)
>  
> What do I need to do so STL works? 
> Is this a Slackware-specific problem?

Maybe.

> Maybe I need to go back to 3.0, or up to 3.3?
>  
> thanks so much!
>  
> Brent
>  
> ----BEGIN COMPILER ERROR OUTPUT---
> # gcc test.cpp -o test
> In file included from
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr.h:98,
>                  from
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/c++io.h:37,
>                  from
> /usr/include/c++/3.2.2/bits/fpos.h:44,
>                  from
> /usr/include/c++/3.2.2/iosfwd:46,
>                  from
> /usr/include/c++/3.2.2/bits/stl_algobase.h:70,
>                  from
> /usr/include/c++/3.2.2/vector:67,
>                  from test.cpp:5:
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:49:
> syntax 
>    error before `;' token
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:50:
> syntax 
>    error before `;' token
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:51:
> syntax 
>    error before `;' token
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:
> In function 
>    `int __gthread_active_p()':
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:93:
> `
>    pthread_create' undeclared (first use this
> function)
> /usr/include/c++/3.2.2/i386-slackware-linux/bits/gthr-default.h:93:
> (Each 
>    undeclared identifier is reported only once for
> each function it appears 
[snip]

Do you have a package named libc-devel (or maybe glibc-devel?) ? If
    not, install it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]