This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


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

namespaces with egcs 1.1.2 and Solaris 2.5


Hello,
I've build egcs 1.1.2 under Solaris 2.5 with following
config-options:
../objdir> /home/bender/cc/egcs-1.1.2/configure 
	--prefix=/home/bender/local 
	--with-gnu-as=/home/bender/local/bin/as 
	--with-gnu-ld=/home/bender/local/bin/ld 
	--enable-cpp
../objdir> make bootstrap
../objdir> make install

This worked fine and without any errors.
Finaly I want to compile following little Programm:
#include <iostream>

namespace test {
    void foo() { cout << "namespace-foo" << endl;
};

void foo() { std::cout << "foo" << std::endl; }

int main()
{
    foo();
    test::foo();
    return 0;
} 

I recieve follwing errormessages:
..> c++ -c -g -DSOLARIS -I. -I/home/bender/local/include/g++ 
	-I/home/bender/local/sparc-sun-solaris2.5/include 
	-I/home/bender/local/lib/gcc-lib/sparc-sun-solaris2.5/egcs-2.91.66/include 
	-I/home/bender/local/include main.cpp
main.cpp: In function `void laber()':
main.cpp:7: redefinition of `void laber()'
main.cpp:4: `void laber()' previously defined here
main.cpp: At top level:
main.cpp:15: parse error at end of input

Is this my fault? 
Please help! I can't find any answer in the mailinglist-archiv or the FAQ

bye
Peter Bender