Hello Everyone!
I have a problem with an old project, that they want me to compile in Visual Studio. This application was working in QtCreator with gcc compiler, but while in VS10 with Qt implementation it has some compile errors. The linker doesn't find the methods in the dll. This is a sample from the problematic classes:
template <class SW> class RCC_EXPORT_IMPORT SettingsWidgetList : public ObjectList<SW>
{
public:
inline RCC::Result apply()
{
bool isOk=true;
for(int i=0, l=ObjectList<SW>::count(); i < l; ++i)
{
if(!rcc_resultToBool((*this)[i]->apply()))
isOk=false;
}
return rcc_boolToResult(isOk);
}
};
This is from the dll's public header.
...and the linker tells this:
Error 794 error LNK2019: unresolved external symbol "__declspec(dllimport) public: enum ReworkClient::RCC::Result __thiscall ReworkClient::SettingsWidgetList<class ReworkClient::ProfileSettingsWidget>::apply(void)" (__imp_?apply@?$SettingsWidgetList@VProfileSettingsWidget@ReworkClient@@@ReworkClient@@QAE?AW4Result@RCC@2@XZ) referenced in function "private: void __thiscall ProfileDialog::on_OkButton_clicked(void)" (?on_OkButton_clicked@ProfileDialog@@AAEXXZ) C:\!projects\c++\ReworkClient\2.0.x\ReworkClient\rcprofile.obj ReworkClient
It seems the problem with the apply() method, but I don't understand what can be the difference between the VS and gcc compilers working. Anyone has any idea what can be wrong with the apply method's declaration?
Any idea are welcomed (even critiques)! Im out of clues...
Thank you for reading!
Regards
Adam