How to handle this problem in MS VC++
From: Cris Ding (cris.ding_at_mh.se)
Date: 02/17/04
- Next message: Christopher Dyken: "Re: C dangerous?"
- Previous message: Joona I Palaste: "Re: C dangerous?"
- Next in thread: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Reply: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Reply: Mark McIntyre: "Re: How to handle this problem in MS VC++"
- Reply: Rob Thorpe: "Re: How to handle this problem in MS VC++"
- Reply: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Feb 2004 12:53:01 -0800
Hi, everyone,
Suppose the following simple program:
#include "engine.h"
int main()
{
Engine *ep;
if (!(ep = engOpen(NULL))) {
printf("Can't start MATLAB engine");
exit(-1);
}
engClose(ep);
return(0);
}
When I was trying to compile and link the program:
Linking...
engwindemo.obj : error LNK2001: unresolved external symbol _engClose
engwindemo.obj : error LNK2001: unresolved external symbol _engOpen
Debug/engwindemo.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
engwindemo.exe - 3 error(s), 0 warning(s)
Then I found "engClose" and "engOpen" are defined in "liben.def",
which in turn is directed to "libeng.dll" as indicated by the
following information.
LIBRARY libeng.dll
EXPORTS
_engClose=engClose
...
_engOpen=engOpen
...
_libeng_build_date=libeng_build_date
_libeng_version=libeng_version
I added all these two files into the project, but still the linking
error information appears. I wonder whether I have put the
"libeng.dll" into a wrong directory, that is, I should not add
"libeng.dll" into the project, but put it into some other proper
directory instead so that MS VC++ can find it when linking. Could
anyone give me some hints on this? Thanks a lot.
VB
/Cris
- Next message: Christopher Dyken: "Re: C dangerous?"
- Previous message: Joona I Palaste: "Re: C dangerous?"
- Next in thread: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Reply: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Reply: Mark McIntyre: "Re: How to handle this problem in MS VC++"
- Reply: Rob Thorpe: "Re: How to handle this problem in MS VC++"
- Reply: Joona I Palaste: "Re: How to handle this problem in MS VC++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|