can't link after converting VC++6.0 to 2003

W

Wanjun Yu

I have just loaded my VC++6 projects in Visual Studio 2003. It converted the
project files just fine.

I have a MFC dll that links against a WIN32 dll. In the WIN32 dll, I have
exported some functions (not classes).

But now it won't link any more (Teh projects works file in VC++6). The MFC
dlls always says 'external symobls'.

What is wrong, I always thought I could load 'working' VC++6 projects into
..NET 2003 and compile, looks like it is not the case.

Thanks for any help.

Wanjun
 
W

William DePalo [MVP VC++]

Wanjun Yu said:
What is wrong, I always thought I could load 'working' VC++6 projects into
.NET 2003 and compile, looks like it is not the case.

Thanks for any help.

The first step towards finding a solution would be to post the number and
exact text of the error message you get.

As a general rule, if you are trying to import classes rather than a flat
procedural interface, then the binary that exports them should be built with
the same tool set.

Regards,
Will
 
G

Guest

Did you remember to but the .lib and .dll files in the same directory as your
executible when you created the new VS2003 project?
 
W

Wanjun Yu

OK, here is the error message, this project is linking againt the LLDRV
project,

EgCommon error LNK2019: unresolved external symbol _LLDRV_NEW referenced in
function "public: static void __cdecl
CEgUtilLLdrv::LLdrv(double,double,double *,double
*,int,int,int,float,float,float)" (?LLdrv@CEgUtilLLdrv@@SAXNNPAN0HHHMMM@Z)


In the LLDRV project, I have defined,

#define DECLSPEC(x) _declspec(dllexport) x

DECLSPEC(void) LLDRV_NEW();

I have set the dependency to depend on the LLDRV project.

Thanks for looking into this.

Wanjun
 
W

William DePalo [MVP VC++]

Wanjun Yu said:
OK, here is the error message, this project is linking againt the LLDRV
project,

EgCommon error LNK2019: unresolved external symbol _LLDRV_NEW referenced
in function "public: static void __cdecl
CEgUtilLLdrv::LLdrv(double,double,double *,double
*,int,int,int,float,float,float)" (?LLdrv@CEgUtilLLdrv@@SAXNNPAN0HHHMMM@Z)


In the LLDRV project, I have defined,

#define DECLSPEC(x) _declspec(dllexport) x

DECLSPEC(void) LLDRV_NEW();

I have set the dependency to depend on the LLDRV project.

OK. First take the DLL that exports LLDRV_NEW. At the command line, type

dumpbin /exports YourDllNameGoesHere.dll

Do you see the export? If so, what is its name?

If all looks OK did you add the import library for the DLL to your project?
Thanks for looking into this.

You are welcome.

Regards,
Will
 
B

Bruno van Dooren

As a general rule, if you are trying to import classes rather than a flat
procedural interface, then the binary that exports them should be built
with the same tool set.

even if it would work on your pc, that doesn't mean it will work somewhere
else.
i have had that problem with a dll that contained classes compiled with VC6.
using it in a VC7 application would work on my dev system, where is had both
VS6 and 7 installed, but it wouldn't work on a 'clean' pc.

my only option was to revert back to VS6 for that application.

kind regards,
Bruno.
 
B

Bruno van Dooren

maybe a stupid suggestion, but did you configure the paths for include
files, libraries and executable files when you migrated to the new VS?
otherwise the linker wouldn't know where the libraries can befound..

kind regards,
Bruno.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top