Help: problem with the gcc c++ 4.3.0 compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I would really appreciate if you could help me with a c++ compilation problem.
I will try to summarize the problem I have and give you more details after.
I use the Mandriva 2006 distribution with gcc 4.0.1. 
I just installed a local version of gcc c++ 4.3.0.
I have few compilation errors when I compile some c++ code with 4.3.0 that
I did not have with version 4.0.1.
One that is annoying appears when compiling the following piece of code:

CODE BEGIN ----------------------------------------------------------------
#include 
#include 

	template  
	struct structure
	{
		template  class C>
		void print(const C& vect){std::cout<<"\n ok \n";}
	};

int main()
{
	std::vector vect(2);
	vect[0]=1; vect[1]=2; #include 
#include 

	template  
	struct structure
	{
		template  class C>
		void print(const C& vect){std::cout<<"\n ok \n";}
	};

int main()
{
	std::vector vect(2);
	vect[0]=1; vect[1]=2; 
	structure struct_test;
	struct_test.print(vect);
}
	structure struct_test;
	struct_test.print(vect);
}
CODE END -------------------------------------------------------------------

I am not an expert and it could be that I did something wrong when I installed version 4.3.0 of the 
compiler. 
Maybe you can tell me it is really a compiler problem ?
Thank you in adance for any help.
Sincerely,
Francois


INFORMATION:

MESSAGE WHEN TRYING TO COMPILE THE PREVIOUS CODE WITH VERSION 4.3.0:
Error message:
In function 'int main()':
erreur: no matching function for call to 'structure::print(std::vector>&)'

MY SYSTEM: Mandriva 2006 with gcc version 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)

CONFIGURED WITH: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-languages=c,c++,ada,f95,objc,java --host=i586-mandriva-linux-gnu --with-system-zlib --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo --disable-libjava-multilib
Thread model: posix

LOCAL GCC version THAT I INSTALLED:	gcc version 4.3.0 (GCC)	installed locally

CONFIGURED WITH: ../gcc-4.3.0/configure --prefix=
/home/Mes_Programmes/gcc-4.3.0/gcc-4.3.0_install --program-suffix=-4.3.0 --with-local-prefix=
/home/Mes_Programmes/gcc-4.3.0/gcc-4.3.0_install --enable-shared --enable-threads --enable-threads=posix --enable-languages=c++,fortran --with-gmp=
/home/Mes_Programmes/gmp-4.2.2/gmp-4.2.2_install --with-gmp-include=
/home/Mes_Programmes/gmp-4.2.2/gmp-4.2.2_install/include/ --with-gmp-lib=
/home/Mes_Programmes/gmp-4.2.2/gmp-4.2.2_install/lib/ --with-mpfr=
/home/Mes_Programmes/mpfr-2.3.1/mpfr-2.3.1_install --with-mpfr-include=
/home/Mes_Programmes/mpfr-2.3.1/mpfr-2.3.1_install/include/ --with-mpfr-lib=
/home/Mes_Programmes/mpfr-2.3.1/mpfr-2.3.1_install/lib/
Modèle de thread: posix
_________________________________________________________________
Faites vous de nouveaux amis grâce à l'annuaire des profils Messenger !
http://home.services.spaces.live.com/search/?page=searchresults&ss=true&FormId=AdvPeopleSearch&form=SPXFRM&tp=3&sc=2&pg=0&Search.DisplayName=Nom+public&search.gender=&search.age=&Search.FirstName=Pr%C3%A9nom&Search.LastName=Nom&search.location=Lieu&search.occupation=Profession&search.interests=amis&submit=Rechercher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux