Migrating to VC 8 from VC 7: link errors

G

Guest

Hi.
I'm trying to migrate a small library to VC8 via the wizard, but when I try
to compile I get the following errors:

Error 1 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 2 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 3 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) Stdafx.obj
Error 4 fatal error LNK1120: 1 unresolved
externals C:\AllMyStuff\MyPrograms\MyModels\ReflectometryModel\Debug\ReflectometryModel.dll 1

The only external librariea I reference are <cmath> and <complex>. The
library compiled and worked fine before conversion, but required msvcrt.lib
and mscvcrtd.lib to be included in the project. These are also included after
conversion.

Any help would be greaty appreciated.

Thanks.
Matt Brown.
 
H

Holger Grund

PDHB said:
I'm trying to migrate a small library to VC8 via the wizard, but when I
try
to compile I get the following errors:

Error 1 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 2 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 3 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"
(?.cctor@@$$FYMXXZ) Stdafx.obj
Error 4 fatal error LNK1120: 1 unresolved
externals
C:\AllMyStuff\MyPrograms\MyModels\ReflectometryModel\Debug\ReflectometryModel.dll
1
This is likely due to hacks that were required in VC 7 & 7.1 to work around
the loader lock issue.

You may want to take a look at this thread:
news://news.microsoft.com/[email protected]
http://groups.google.com/group/micr...7c5bb03c6dd/ec322d903925ce88#ec322d903925ce88

Bottom line: Remove the /NOENTRY /Zl /DEFAULTLIB switches.

-hg
 
G

Guest

Thanks. I tried to follow what the thread said to no avail. I don't know if
I did it correctly.

In the end I just created a new project and moved all of the source and
header files over This seems to work.
 

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