Re: [Cppunit-devel] Compiling Money Example on Visual Studio 2005
Brought to you by:
blep
From: CppUnit d. m. l. <cpp...@li...> - 2007-04-07 15:20:56
|
> error LNK2019: unresolved external symbol "__declspec(dllimport) public: > char const * __thiscall type_info::name(void)const " I can compile the Money example with Visual C++ 2005 Professional SP1 without any problems. Note : I don't use the English version of Visual Studio, so the labels I use here may not be fully the same as yours. I use the following procedure : 1) Unpack cppunit-1.11.0.tar.gz 3) Open examples\examples.dsw and convert all projects 4) Right click on the "money" project and select "Define as startup project" 5) Right click on the "money" project and select "Properties". Go to "Configuration properties" > "Linker" > "Input". In the list "Additional dependencies" remove "cppunitd.lib" then click "OK". 6) Click on the menu "Build" > "Build money". There are some warnings about sprintf. After the build, the tests are run : OK (4) The errors you get seems to be due to inconsistent compiler options between the static library "cppunit" and the "money" example. Especially the option /GR for enabling RTTI (Runtime Type Information). The option can be found in the Project Properties dialog box : "Configuration properties" > "C/C++" > "Language" > "Enable type information" Another point to be checked : before trying to compile with VS2005, did you try to compile with VS2003 or another older compiler ? If you did, make sure to "clean" your project, by deleting all directories named "Debug" or "Release" before trying to compile again. Good luck. Vincent Rivière vri...@us... |