Forum Replies Created
-
AuthorPosts
-
12 April 2016 at 15:20 in reply to: [SOLVED] Linker Errors while compiling v15.12 in VS 2015 on Windows 8.1 #6532MichaelBlocked
I have tried recompiling zlib from the sources, however I am still getting errors when I try to compiling SOFA. I followed this guide for compiling zlib, and that seemed to be successful. I end up with a file named “zlibwapi.dll”, however the zlib readme says that I may rename the file to “zlib.dll”.
I am going to keep trying.
Here is the new set of errors I am encountering. Hopefully this should help diagnose the error:
LNK1120 5 unresolved externals SofaMiscTopology E:\sofa\v15.12\build\bin\Debug\SofaMiscTopology_d.dll LNK1120 4 unresolved externals SofaExporter E:\sofa\v15.12\build\bin\Debug\SofaExporter_d.dll LNK1120 5 unresolved externals SofaLoader E:\sofa\v15.12\build\bin\Debug\SofaLoader_d.dll LNK2001 unresolved external symbol _gzputs SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteTopology.obj LNK2001 unresolved external symbol _gzflush SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteTopology.obj LNK2001 unresolved external symbol _gzclose SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteTopology.obj LNK2001 unresolved external symbol _gzopen SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteTopology.obj LNK2001 unresolved external symbol _gzgets SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadTopology.obj LNK2001 unresolved external symbol _gzrewind SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadTopology.obj LNK2001 unresolved external symbol _gzeof SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadTopology.obj LNK2001 unresolved external symbol _gzclose SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadTopology.obj LNK2001 unresolved external symbol _gzopen SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadTopology.obj LNK2019 unresolved external symbol _gzgets referenced in function "public: bool __thiscall sofa::component::misc::TopologicalChangeProcessor::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@TopologicalChangeProcessor@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\TopologicalChangeProcessor.obj LNK2019 unresolved external symbol _gzrewind referenced in function "public: bool __thiscall sofa::component::misc::TopologicalChangeProcessor::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@TopologicalChangeProcessor@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\TopologicalChangeProcessor.obj LNK2019 unresolved external symbol _gzeof referenced in function "public: bool __thiscall sofa::component::misc::TopologicalChangeProcessor::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@TopologicalChangeProcessor@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\TopologicalChangeProcessor.obj LNK2019 unresolved external symbol _gzclose referenced in function "protected: virtual __thiscall sofa::component::misc::TopologicalChangeProcessor::~TopologicalChangeProcessor(void)" (??1TopologicalChangeProcessor@misc@component@sofa@@MAE@XZ) SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\TopologicalChangeProcessor.obj LNK2019 unresolved external symbol _gzopen referenced in function "public: virtual void __thiscall sofa::component::misc::TopologicalChangeProcessor::readDataFile(void)" (?readDataFile@TopologicalChangeProcessor@misc@component@sofa@@UAEXXZ) SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\TopologicalChangeProcessor.obj LNK2019 unresolved external symbol _gzputs referenced in function "public: virtual void __thiscall sofa::component::misc::WriteState::handleEvent(class sofa::core::objectmodel::Event *)" (?handleEvent@WriteState@misc@component@sofa@@UAEXPAVEvent@objectmodel@core@4@@Z) SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteState.obj LNK2019 unresolved external symbol _gzflush referenced in function "public: virtual void __thiscall sofa::component::misc::WriteState::handleEvent(class sofa::core::objectmodel::Event *)" (?handleEvent@WriteState@misc@component@sofa@@UAEXPAVEvent@objectmodel@core@4@@Z) SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteState.obj LNK2019 unresolved external symbol _gzclose referenced in function "protected: virtual __thiscall sofa::component::misc::WriteState::~WriteState(void)" (??1WriteState@misc@component@sofa@@MAE@XZ) SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteState.obj LNK2019 unresolved external symbol _gzopen referenced in function "public: virtual void __thiscall sofa::component::misc::WriteState::init(void)" (?init@WriteState@misc@component@sofa@@UAEXXZ) SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\WriteState.obj LNK2019 unresolved external symbol _gzgets referenced in function "public: bool __thiscall sofa::component::misc::ReadState::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@ReadState@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadState.obj LNK2019 unresolved external symbol _gzrewind referenced in function "public: bool __thiscall sofa::component::misc::ReadState::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@ReadState@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadState.obj LNK2019 unresolved external symbol _gzeof referenced in function "public: bool __thiscall sofa::component::misc::ReadState::readNext(double,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &)" (?readNext@ReadState@misc@component@sofa@@QAE_NNAAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadState.obj LNK2019 unresolved external symbol _gzclose referenced in function "protected: virtual __thiscall sofa::component::misc::ReadState::~ReadState(void)" (??1ReadState@misc@component@sofa@@MAE@XZ) SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadState.obj LNK2019 unresolved external symbol _gzopen referenced in function "public: virtual void __thiscall sofa::component::misc::ReadState::reset(void)" (?reset@ReadState@misc@component@sofa@@UAEXXZ) SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\ReadState.obj
– Michael Cooper
1 April 2016 at 18:10 in reply to: [SOLVED] Linker Errors while compiling v15.12 in VS 2015 on Windows 8.1 #6445MichaelBlockedThanks Guillaume,
That did seem to fix the error I was having. However, I am now getting another set of errors. The main cause of this seems to be a conflict with MSVCRT. This prevents
SofaLoader_d.dll
,SofaExporter_d.dll
, andSofaMiscTopology_d.dll
from being built. This is from building the debug version.Unlike before, most of the .dlls build successfully and the
runSofa_d.exe
is made. However,runSofa_d.exe
creates an error becauseSofaLoader_d.dll
is missing.I’ll try some of the suggestions I found online for dealing with LNK4098. In the meantime, here are the error messages I am getting.
Build Log:
23>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 23>zlib.lib(gzlib.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function _gzdopen 23>zlib.lib(gzwrite.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf referenced in function _gzprintf 23>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp__vsnprintf 23>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf 23>E:\sofa\v15.12\build\bin\Debug\SofaLoader_d.dll : fatal error LNK1120: 3 unresolved externals ... 26>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 26>zlib.lib(gzwrite.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf referenced in function _gzprintf 26>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp__vsnprintf 26>zlib.lib(gzlib.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function _gzdopen 26>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf 26>E:\sofa\v15.12\build\bin\Debug\SofaExporter_d.dll : fatal error LNK1120: 3 unresolved externals ... 37>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 37>zlib.lib(gzlib.obj) : error LNK2019: unresolved external symbol __imp__sprintf referenced in function _gzdopen 37>zlib.lib(gzwrite.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf referenced in function _gzprintf 37>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp__vsnprintf 37>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf 37>E:\sofa\v15.12\build\bin\Debug\SofaMiscTopology_d.dll : fatal error LNK1120: 3 unresolved externals
Error List:
Code Description Project File LNK2019 unresolved external symbol __imp__sprintf referenced in function _gzdopen SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\zlib.lib(gzlib.obj) LNK2019 unresolved external symbol __imp__vsnprintf referenced in function _gzprintf SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\zlib.lib(gzwrite.obj) LNK2001 unresolved external symbol __imp__vsnprintf SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\MSVCRTD.lib(vsnprintf.obj) LNK2001 unresolved external symbol __imp___vsnprintf SofaLoader E:\sofa\v15.12\build\SofaCommon\SofaLoader\MSVCRTD.lib(vsnprintf.obj) LNK1120 3 unresolved externals SofaLoader E:\sofa\v15.12\build\bin\Debug\SofaLoader_d.dll LNK2019 unresolved external symbol __imp__vsnprintf referenced in function _gzprintf SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\zlib.lib(gzwrite.obj) LNK2001 unresolved external symbol __imp__vsnprintf SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\MSVCRTD.lib(vsnprintf.obj) LNK2019 unresolved external symbol __imp__sprintf referenced in function _gzdopen SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\zlib.lib(gzlib.obj) LNK2001 unresolved external symbol __imp___vsnprintf SofaExporter E:\sofa\v15.12\build\SofaGeneral\SofaExporter\MSVCRTD.lib(vsnprintf.obj) LNK1120 3 unresolved externals SofaExporter E:\sofa\v15.12\build\bin\Debug\SofaExporter_d.dll LNK2019 unresolved external symbol __imp__sprintf referenced in function _gzdopen SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\zlib.lib(gzlib.obj) LNK2019 unresolved external symbol __imp__vsnprintf referenced in function _gzprintf SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\zlib.lib(gzwrite.obj) LNK2001 unresolved external symbol __imp__vsnprintf SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\MSVCRTD.lib(vsnprintf.obj) LNK2001 unresolved external symbol __imp___vsnprintf SofaMiscTopology E:\sofa\v15.12\build\SofaMisc\SofaMiscTopology\MSVCRTD.lib(vsnprintf.obj) LNK1120 3 unresolved externals SofaMiscTopology E:\sofa\v15.12\build\bin\Debug\SofaMiscTopology_d.dll
Thanks for the help,
Michael Cooper -
AuthorPosts