|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
gcc STL issueHello!
I am getting a very strange error while trying to compile file that uses STL list container. I am using FC6 with gcc4.1.1 and it gives me error like : ------------------------------------------------------- g++ -c -g ...<file>.C /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:68: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:83: error: expected nested-name-specifier before ‘list’ /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:83: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:93: error: expected nested-name-specifier before ‘list’ /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:93: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:104: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:118: error: expected constructor, destructor, or type conversion before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:141: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:156: error: too many template-parameter-lists /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:173: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:190: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:210: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:237: error: expected initializer before ‘<’ token /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:275: error: too many template-parameter-lists /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:293: error: too many template-parameter-lists /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:314: error: too many template-parameter-lists /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/list.tcc:342: error: too many template-parameter-lists ------------------------------------------------------- Did anybody meet such a problem? Thanks! |
|
|
Re: gcc STL issue> g++ -c -g ...<file>.C Please include file.C -benjamin |
|
|
Re: gcc STL issueI can't do it. This files includes many headers to be build.
But, this file includes compat.h header (compat.h). I found that problem disappears when I comment line that includes "list" header in compat.h and add "#include <list>" before including compat.h it in file.C. Strange thing that I don't get any errors pointing to my files.
|
| Free embeddable forum powered by Nabble | Forum Help |