Connecting Tech Pros Worldwide Help | Site Map

error LNK2001: unresolved external symbol

sadegh
Guest
 
Posts: n/a
#1: Apr 16 '07
Hi

I have a problem with my program in VC++6
When I compile it, the following errors are listed. I spend a lot of
time on the groups.google.com to find its reason, but none of
comments
could not help me. Does any body know what is the problem?
By the way, I have already added the matrixop.h to AfxStd.h
the matrixop.h is a library that I have been written to doing matrix
operation. for example the MLength() function returns the size of a
matix.

Thanks.


OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?
MLength@@YAHABV?
$matrix@N@math@@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?
MLength@@YAHABV?
$matrix@N@math@@@Z)
OtherFunctions.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MHoriz(class math::matrix<doubleconst
&)" (?MHoriz@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MConCat(class math::matrix<doubleconst
&,class math::matrix<doubleconst &,char)" (?MConCat@@YA?AV?
$matrix@N@math@@ABV12@0D@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MSubMat(class math::matrix<doubleconst
&,int,int,int,int)" (?MSubMat@@YA?AV?$matrix@N@math@@ABV12@HHHH@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MDotDiv(class math::matrix<doubleconst
&,double)" (?MDotDiv@@YA?AV?$matrix@N@math@@ABV12@N@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "void
__cdecl MInsert(class math::matrix<double&,double)" (?
MInsert@@YAXAAV?$matrix@N@math@@N@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "double
__cdecl MtoD(class math::matrix<doubleconst &)" (?MtoD@@YANABV?
$matrix@N@math@@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MSum(class math::matrix<doubleconst
&)" (?MSum@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MDotMul(class math::matrix<doubleconst
&,double)" (?MDotMul@@YA?AV?$matrix@N@math@@ABV12@N@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MDotDiv(class math::matrix<doubleconst
&,class math::matrix<doubleconst &)" (?MDotDiv@@YA?AV?
$matrix@N@math@@ABV12@0@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MLog10(class math::matrix<doubleconst
&)" (?MLog10@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MAsin(class math::matrix<doubleconst
&)" (?MAsin@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MSqrt(class math::matrix<doubleconst
&)" (?MSqrt@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MDotMul(class math::matrix<doubleconst
&,class math::matrix<doubleconst &)" (?MDotMul@@YA?AV?
$matrix@N@math@@ABV12@0@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MCos(class math::matrix<doubleconst
&)" (?MCos@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MDotPow(class math::matrix<doubleconst
&,double)" (?MDotPow@@YA?AV?$matrix@N@math@@ABV12@N@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MSin(class math::matrix<doubleconst
&)" (?MSin@@YA?AV?$matrix@N@math@@ABV12@@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MRemCol(class math::matrix<doubleconst
&,int)" (?MRemCol@@YA?AV?$matrix@N@math@@ABV12@H@Z)
Preprocess.obj : error LNK2001: unresolved external symbol "class
math::matrix<double__cdecl MSub(class math::matrix<doubleconst
&,double)" (?MSub@@YA?AV?$matrix@N@math@@ABV12@N@Z)
Debug/Software.exe : fatal error LNK1120: 19 unresolved externals
Error executing link.exe.


Software.exe - 21 error(s), 0 warning(s)

Eberhard Schefold
Guest
 
Posts: n/a
#2: Apr 16 '07

re: error LNK2001: unresolved external symbol


sadegh wrote:
Quote:
OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?
MLength@@YAHABV?
$matrix@N@math@@@Z)
In comp.lang.c++, Victor Bazarov gave you the following answer:
Quote:
No, it's not the "library that contains these math classes". It's
the header that contains the definitions of the classes. The actual
implementation is most likely in a ".lib" file. You need to read the
documentation for your library and pay attention to what you need to
do with the .lib file, along with adding the header to your source.
This was excellent advice. Do not ignore it.
Closed Thread