[CMake] cmake strange errors when porting VS2005
Mike Jackson
imikejackson at gmail.com
Fri Apr 4 15:05:48 EDT 2008
On 4/4/08, Alin M Elena <alin.elena at qub.ac.uk> wrote:
>
> Hi,
>
> I try to port an application on windows using VS2005 Professional edition.
> It uses qt4 and readline. As external libs
>
>
>
> I get this set of errors that do not help me to much in the linking stage
>
>
>
> Linking CXX executable bin\aten.exe
>
> gui.lib(disorder_funcs.cpp.obj) : error LNK2019: unresolved external symbol
> "public: bool __thiscall Model::isMoveAllowe
>
> d(enum MonteCarlo::MoveType)"
> (?isMoveAllowed at Model@@QAE_NW4MoveType at MonteCarlo@@@Z) referenced in
> function "private: vo
>
> id __thiscall AtenForm::refreshComponentData(void)"
> (?refreshComponentData at AtenForm@@AAEXXZ)
>
> command.lib(disorder.cpp.obj) : error LNK2001: unresolved external symbol
> "public: bool __thiscall Model::isMoveAllowed(
>
> enum MonteCarlo::MoveType)"
> (?isMoveAllowed at Model@@QAE_NW4MoveType at MonteCarlo@@@Z)
>
> methods.lib(mc.cpp.obj) : error LNK2001: unresolved external symbol "public:
> bool __thiscall Model::isMoveAllowed(enum M
>
> onteCarlo::MoveType)" (?isMoveAllowed at Model@@QAE_NW4MoveType at MonteCarlo@@@Z)
>
> gui.lib(disorder_funcs.cpp.obj) : error LNK2019: unresolved external symbol
> "public: int __thiscall Model::nRequested(vo
>
> id)" (?nRequested at Model@@QAEHXZ) referenced in function "private: void
> __thiscall AtenForm::refreshComponentData(void)"
>
> (?refreshComponentData at AtenForm@@AAEXXZ)
>
> command.lib(disorder.cpp.obj) : error LNK2001: unresolved external symbol
> "public: int __thiscall Model::nRequested(void
>
> )" (?nRequested at Model@@QAEHXZ)
>
> methods.lib(mc.cpp.obj) : error LNK2001: unresolved external symbol "public:
> int __thiscall Model::nRequested(void)" (?n
>
> Requested at Model@@QAEHXZ)
>
> gui.lib(disorder_funcs.cpp.obj) : error LNK2019: unresolved external symbol
> "public: void __thiscall Model::setNRequeste
>
> d(int)" (?setNRequested at Model@@QAEXH at Z) referenced in function "private:
> void __thiscall AtenForm::on_PopulationSpin_val
>
> ueChanged(int)"
> (?on_PopulationSpin_valueChanged at AtenForm@@AAEXH at Z)
>
> command.lib(disorder.cpp.obj) : error LNK2001: unresolved external symbol
> "public: void __thiscall Model::setNRequested(
>
> int)" (?setNRequested at Model@@QAEXH at Z)
>
> methods.lib(mc.cpp.obj) : error LNK2001: unresolved external symbol "public:
> void __thiscall Model::setNRequested(int)"
>
> (?setNRequested at Model@@QAEXH at Z)
>
> gui.lib(disorder_funcs.cpp.obj) : error LNK2019: unresolved external symbol
> "public: void __thiscall Model::setMoveAllow
>
> ed(enum MonteCarlo::MoveType,bool)"
> (?setMoveAllowed at Model@@QAEXW4MoveType at MonteCarlo@@_N at Z) referenced in
> function "pri
>
> vate: void __thiscall
> AtenForm::on_ComponentTranslateCheck_clicked(bool)"
> (?on_ComponentTranslateCheck_clicked at AtenForm@
>
> @AAEX_N at Z)
>
> methods.lib(mc.cpp.obj) : error LNK2019: unresolved external symbol "public:
> class Pattern * __thiscall Model::component
>
> Pattern(void)" (?componentPattern at Model@@QAEPAVPattern@@XZ) referenced in
> function "public: bool __thiscall MonteCarlo::
>
> disorder(class Model *)" (?disorder at MonteCarlo@@QAE_NPAVModel@@@Z)
>
> methods.lib(mc.cpp.obj) : error LNK2019: unresolved external symbol "public:
> void __thiscall Model::setComponentPattern(
>
> class Pattern *)" (?setComponentPattern at Model@@QAEXPAVPattern@@@Z)
> referenced in function "public: bool __thiscall Monte
>
> Carlo::disorder(class Model *)" (?disorder at MonteCarlo@@QAE_NPAVModel@@@Z)
>
> bin\aten.exe : fatal error LNK1120: 6 unresolved externals
>
> LINK Pass 1 failed. with 2
>
>
>
>
>
> cmake version 2.5-20080207
>
> I add in attach the CMakeLists.txt
>
>
>
> Alin
>
Looks like either all the source files are NOT listed in your
CMakeLists.txt file OR you need another library to link against.
Do you have a file called "Model.h" that declares the "Model" class or
is "Model" declared in an external library?
--
Mike Jackson
imikejackson _at_ gee-mail dot com
More information about the CMake
mailing list