PDA

View Full Version : Code works with 4.3.3 but not with 4.4.0 (both commercial)



akshay_blitz
5th June 2008, 20:07
Hi,
I have been using 4.3.3 commercial for sometime now and have shifted to 4.4.0 commercial...I tried using the same code that ran perfectly well on 4.3.3 but it doesnt compile on 4.4.0 :(
Heres is what VS2005 cries out :


1>Linking...
1>qtmain.lib(qtmain_win.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std @@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$al locator@D@2@@0@ABV10@0@Z) already defined in msvcprt.lib(MSVCP80.dll)
1>release\Hello.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Build log was saved at "file://c:\Documents and Settings\Cyberwarrior\My Documents\Visual Studio 2005\Projects\MVC Triangles\release\BuildLog.htm"
1>Hello - 2 error(s), 34 warning(s)


I have no idea whats going on ?
I only changed the QTDIR environment variable when I shifted from 4.3.3 to 4.4.0 (everything else was exactly the same)

Any help would be great !
thanks

Akshay

jacek
5th June 2008, 22:37
The code compiles OK. The problem is in linking with STL. Did you configure Qt 4.4.0 with exactly the same options as 4.3.3?

akshay_blitz
6th June 2008, 06:05
The way I configured was to install Qt from the setup and set up the path for the bin, include and the lib files...thats how I worked with qt 4.3.3 and so I thought it would work with 4.4.0

I hope I answered your question.
Cheers

jacek
8th June 2008, 01:14
The way I configured was to install Qt from the setup and set up the path for the bin, include and the lib files...thats how I worked with qt 4.3.3 and so I thought it would work with 4.4.0
It should. Do you use the same toolchain as for 4.3.3? Is Qt 4.3.3 still on your disk?