By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 1,973 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

Linking problem when porting C++ to .Net

P: n/a
I am currently trying to port a small open source scientfic library written
in C++ to .Net. The code (including the VS solution) could be found at
http://www.vermorel.com/opensource/selfscaling.zip

My problem is that when I try to compile the library I got a list of linking
error messages. I am not a specialist of porting C++ code to .Net. Does
anyone has an idea on how to make this code compile in .Net ?

Thanks,
Joannes Vermorel

==== Build Output Error Message ====

Compiling...
Stdafx.cpp
Compiling...
selfscaling.cpp
ModalHistogramIterator.cpp
ModalHistogram.cpp
ListHistogramIterator.cpp
histogram-utils.cpp
histogram-utils.cpp(111) : warning C4018: '>' : signed/unsigned mismatch
histogram-utils.cpp(112) : warning C4018: '<' : signed/unsigned mismatch
histogram-utils.cpp(188) : warning C4018: '<' : signed/unsigned mismatch
histogram-utils.cpp(191) : warning C4018: '<' : signed/unsigned mismatch
histogram-user.cpp
EquiProbableHistogramIterator.cpp
EquiProbableHistogram.cpp
EquiErrorHistogramIterator.cpp
EquiErrorHistogram.cpp
AssemblyInfo.cpp
ArrayHistogramIterator.cpp
Generating Code...
Linking...
ModalHistogram.obj : error LNK2001: unresolved external symbol "void __cdecl
operator delete(void *)" (??3@$$FYAXPAX@Z)
ModalHistogramIterator.obj : error LNK2019: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"class HistogramIterator * __cdecl newModeIterator(double *,struct
histogramMode_ *,double,double,int)"
(?newModeIterator@@YAPAVHistogramIterator@@PANPAUh istogramMode_@@NNH@Z)
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
histogram-user.obj : error LNK2001: unresolved external symbol "void __cdecl
operator delete(void *)" (??3@$$FYAXPAX@Z)
histogram-utils.obj : error LNK2019: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"double __cdecl rfloor(double)" (?rfloor@@YANN@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
EquiErrorHistogram.obj : error LNK2019: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"public: __thiscall EquiErrorHistogram::EquiErrorHistogram(int)"
(??0EquiErrorHistogram@@$$FQAE@H@Z)
EquiErrorHistogramIterator.obj : error LNK2019: unresolved external symbol
"void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in
function "public: __thiscall
EquiErrorHistogramIterator::EquiErrorHistogramIter ator(int,int,int,int
*,double *,int *)" (??0EquiErrorHistogramIterator@@QAE@HHHPAHPAN0@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned
int,int,void (__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiErrorHistogramIterator.obj : error LNK2001: unresolved external symbol
"void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol __purecall
referenced in function "public: __thiscall
ModalHistogram::ModalHistogram(int)" (??0ModalHistogram@@QAE@H@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol
__purecall
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol
__purecall
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol
__purecall
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol __purecall
ListHistogramIterator.obj : error LNK2019: unresolved external symbol
__purecall referenced in function "public: virtual void * __thiscall
ListHistogramIterator::`vector deleting destructor'(unsigned int)"
(??_EListHistogramIterator@@UAEPAXI@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol "void
* __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void
* __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void
* __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void
__cdecl __CxxCallUnwindDtor(void (__thiscall*)(void *),void *)"
(?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z)
EquiErrorHistogramIterator.obj : error LNK2001: unresolved external symbol
"void __cdecl __CxxCallUnwindDtor(void (__thiscall*)(void *),void *)"
(?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol
"double __cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "int *
__cdecl _errno(void)" (?_errno@@$$J0YAPAHXZ)
histogram-user.obj : error LNK2001: unresolved external symbol "int __cdecl
fputc(int,struct _iobuf *)" (?fputc@@$$J0YAHHPAU_iobuf@@@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl floor(double)" (?floor@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl floor(double)" (?floor@@$$J0YANN@Z) referenced in function "void
__cdecl initModeDescriptor(struct histogramMode_ *)"
(?initModeDescriptor@@YAXPAUhistogramMode_@@@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl fmod(double,double)" (?fmod@@$$J0YANNN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl fmod(double,double)" (?fmod@@$$J0YANNN@Z) referenced in function
"public: __thiscall ModalHistogram::ModalHistogram(int)"
(??0ModalHistogram@@$$FQAE@H@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl ceil(double)" (?ceil@@$$J0YANN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl sqrt(double)" (?sqrt@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl sqrt(double)" (?sqrt@@$$J0YANN@Z) referenced in function "public:
virtual void __thiscall ModalHistogram::newDataPoint(double)"
(?newDataPoint@ModalHistogram@@$$FUAEXN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "int __cdecl
printf(char const *,...)" (?printf@@$$J0YAHPBDZZ)
fatal error LNK1120: 13 unresolved externals
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I finally solved the problem by myself. The dependency "msvcrt.lib" was
missing from the project settings.

Joannes

"Joannes Vermorel" <fi*******@lastname.com> wrote in message
news:uL*************@TK2MSFTNGP10.phx.gbl...
I am currently trying to port a small open source scientfic library written in C++ to .Net. The code (including the VS solution) could be found at
http://www.vermorel.com/opensource/selfscaling.zip

My problem is that when I try to compile the library I got a list of linking error messages. I am not a specialist of porting C++ code to .Net. Does
anyone has an idea on how to make this code compile in .Net ?

Thanks,
Joannes Vermorel

==== Build Output Error Message ====

Compiling...
Stdafx.cpp
Compiling...
selfscaling.cpp
ModalHistogramIterator.cpp
ModalHistogram.cpp
ListHistogramIterator.cpp
histogram-utils.cpp
histogram-utils.cpp(111) : warning C4018: '>' : signed/unsigned mismatch
histogram-utils.cpp(112) : warning C4018: '<' : signed/unsigned mismatch
histogram-utils.cpp(188) : warning C4018: '<' : signed/unsigned mismatch
histogram-utils.cpp(191) : warning C4018: '<' : signed/unsigned mismatch
histogram-user.cpp
EquiProbableHistogramIterator.cpp
EquiProbableHistogram.cpp
EquiErrorHistogramIterator.cpp
EquiErrorHistogram.cpp
AssemblyInfo.cpp
ArrayHistogramIterator.cpp
Generating Code...
Linking...
ModalHistogram.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
ModalHistogramIterator.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"class HistogramIterator * __cdecl newModeIterator(double *,struct
histogramMode_ *,double,double,int)"
(?newModeIterator@@YAPAVHistogramIterator@@PANPAUh istogramMode_@@NNH@Z)
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
histogram-user.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
histogram-utils.obj : error LNK2019: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"double __cdecl rfloor(double)" (?rfloor@@YANN@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
EquiErrorHistogram.obj : error LNK2019: unresolved external symbol "void
__cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in function
"public: __thiscall EquiErrorHistogram::EquiErrorHistogram(int)"
(??0EquiErrorHistogram@@$$FQAE@H@Z)
EquiErrorHistogramIterator.obj : error LNK2019: unresolved external symbol
"void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z) referenced in
function "public: __thiscall
EquiErrorHistogramIterator::EquiErrorHistogramIter ator(int,int,int,int
*,double *,int *)" (??0EquiErrorHistogramIterator@@QAE@HHHPAHPAN0@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@$$FYAXPAX@Z)
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned
int,int,void (__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void
__stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiErrorHistogramIterator.obj : error LNK2001: unresolved external symbol
"void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void (__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void __stdcall `eh vector destructor iterator'(void *,unsigned int,int,void
(__thiscall*)(void *))" (??_M@$$FYGXPAXIHP6EX0@Z@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol __purecall
referenced in function "public: __thiscall
ModalHistogram::ModalHistogram(int)" (??0ModalHistogram@@QAE@H@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol
__purecall
ArrayHistogramIterator.obj : error LNK2001: unresolved external symbol
__purecall
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol
__purecall
EquiProbableHistogramIterator.obj : error LNK2001: unresolved external
symbol __purecall
ListHistogramIterator.obj : error LNK2019: unresolved external symbol
__purecall referenced in function "public: virtual void * __thiscall
ListHistogramIterator::`vector deleting destructor'(unsigned int)"
(??_EListHistogramIterator@@UAEPAXI@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
ModalHistogramIterator.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "void *
__cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
ListHistogramIterator.obj : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "void
__cdecl __CxxCallUnwindDtor(void (__thiscall*)(void *),void *)"
(?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z)
EquiErrorHistogramIterator.obj : error LNK2001: unresolved external symbol
"void __cdecl __CxxCallUnwindDtor(void (__thiscall*)(void *),void *)"
(?__CxxCallUnwindDtor@@$$J0YAXP6EXPAX@Z0@Z)
EquiErrorHistogram.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol
"double __cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2001: unresolved external symbol "double
__cdecl fabs(double)" (?fabs@@$$J0YANN@Z)
EquiProbableHistogram.obj : error LNK2001: unresolved external symbol "int * __cdecl _errno(void)" (?_errno@@$$J0YAPAHXZ)
histogram-user.obj : error LNK2001: unresolved external symbol "int __cdecl fputc(int,struct _iobuf *)" (?fputc@@$$J0YAHHPAU_iobuf@@@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl floor(double)" (?floor@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl floor(double)" (?floor@@$$J0YANN@Z) referenced in function "void
__cdecl initModeDescriptor(struct histogramMode_ *)"
(?initModeDescriptor@@YAXPAUhistogramMode_@@@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl fmod(double,double)" (?fmod@@$$J0YANNN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl fmod(double,double)" (?fmod@@$$J0YANNN@Z) referenced in function
"public: __thiscall ModalHistogram::ModalHistogram(int)"
(??0ModalHistogram@@$$FQAE@H@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl ceil(double)" (?ceil@@$$J0YANN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "double
__cdecl sqrt(double)" (?sqrt@@$$J0YANN@Z)
ModalHistogram.obj : error LNK2019: unresolved external symbol "double
__cdecl sqrt(double)" (?sqrt@@$$J0YANN@Z) referenced in function "public:
virtual void __thiscall ModalHistogram::newDataPoint(double)"
(?newDataPoint@ModalHistogram@@$$FUAEXN@Z)
histogram-utils.obj : error LNK2001: unresolved external symbol "int __cdecl printf(char const *,...)" (?printf@@$$J0YAHPBDZZ)
fatal error LNK1120: 13 unresolved externals

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.