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

error LNK2001: unresolved external symbol

P: n/a
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?.
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)

Apr 16 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Apr 16, 9:21 am, "sadegh" <sadegh...@yahoo.comwrote:
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?.
Thanks.

OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?MLength@@YAHABV?
$matrix@N@math@@@Z)
What library contains these math classes? It looks like you're not
linking with it.
Apr 16 '07 #2

P: n/a
sadegh wrote:
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?.
Thanks.
OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?MLength@@YAHABV?
$matrix@N@math@@@Z)
[snip]
>
Software.exe - 21 error(s), 0 warning(s)
An "unresolved external symbol" is an identifier that the translator
could not find. In many instances, a source file was not specified
or a library not included.

Examine the requirements of your header files and verify that
you have specified all necessary source and libraries to your
translator (compiler).

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
Apr 16 '07 #3

P: n/a
sadegh wrote:
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?.
The problem is that your linker cannot find the defintions of those
functions.
Most likely you have forgotten to add the module where those function are
defined to the project. However, we can't help you with that because it's
not defined by C++, but by VC++ project organization. Post to
'microsoft.public.vc.project-mgt' or 'microsoft.public.vc.ide_general'.
Thanks.
OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)"
(?MLength@@YAHABV? $matrix@N@math@@@Z)
[..]
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 16 '07 #4

P: n/a
On Apr 16, 5:32 pm, dave_mikes...@fastmail.fm wrote:
On Apr 16, 9:21 am, "sadegh" <sadegh...@yahoo.comwrote:
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?.
Thanks.
OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)" (?MLength@@YAHABV?
$matrix@N@math@@@Z)

What library contains these math classes? It looks like you're not
linking with it.
the library that contains these math classes is matrixop.h where I
have been added it in "StdAfx.h" file.

Apr 16 '07 #5

P: n/a
sadegh wrote:
On Apr 16, 5:32 pm, dave_mikes...@fastmail.fm wrote:
>On Apr 16, 9:21 am, "sadegh" <sadegh...@yahoo.comwrote:
>>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?.
Thanks.
>>OtherFunctions.obj : error LNK2001: unresolved external symbol "int
__cdecl MLength(class math::matrix<doubleconst &)"
(?MLength@@YAHABV? $matrix@N@math@@@Z)

What library contains these math classes? It looks like you're not
linking with it.

the library that contains these math classes is matrixop.h where I
have been added it in "StdAfx.h" file.
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, however, is all off-topic because it's specific to Windows or
Visual C++. Please post to the appropriate newsgroup from the family
'microsoft.public.vc.*'.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 16 '07 #6

P: n/a
Hy!

Can you post some code?

Ronny
Apr 17 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.