Hello
I hope I am in the correct newsgroup, if not please let me know.
I am trying to build a sample for using a certain library ( IFC mapping
to C++ classes, see www.cstb.fr) with MS Visual Studio 2003.
When building a sample program, I get the error mentioned in the title:
LNK2019
Here is a snippet of the error message:
---
main.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: bool __thiscall
IFC20_LONGFORM::SPFwriter::writeSPF(class IFC20_LONGFORM::Model *,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(__imp_?writeSPF@SPFwriter@IFC20_LONGFORM@@QAE_NPAVModel@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
referenced in function _main
main.obj : error LNK2019: unresolved external symbol
"__declspec(dllimport) public: class IFC20_LONGFORM::Model * __thiscall
IFC20_LONGFORM::SPFreader::readSPF(class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &)"
(__imp_?readSPF@SPFreader@IFC20_LONGFORM@@QAEPAVModel@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
referenced in function _main
Debug/CSTBTest2_Console.exe : fatal error LNK1120: 2 unresolved
externals
---
What I have found so far on the net wasn't very helpful. I have read
somewhere, that the reason of the error could have something to do with
different versions of VC (since the libraries were programmed in 2000,
they were probably built with VC5 or 6, I dont know if that is a
problem)
Does anyone know what I can do about this error?
thanks alot in advance!
Ron - 05 Oct 2005 18:09 GMT
Since you stated that the libraries were created in 2000, I would say
that the problem is incompatability with VS2003. The only way that I
know of to get around this is to recompile the libraries or purchase
.Net versions.
Ron
H_A_ - 05 Oct 2005 18:18 GMT
Thanks a lot. I ve received kind of the same reply from someone else,
too, so chances are that the incompatibility is indeed the problem.
The solution you suggest makes of course sense, since it doesnt seem
that they have newer versions of the library, I have emailed the
programmers to ask for the sources, so I can recompile (it is strange
that the sources dont seem to be available at the site even though the
libraries are supposed to be "open source")
thanks again, if you can come up with other solutions, i d be happy to
know.
Haroon