Click to See Complete Forum and Search --> : com dll from vc6 to vc7 Can we ignore these warnings


shinto
September 30th, 2004, 02:06 AM
Hi
Its a conversion of VC6 com dll into .NET 2003. just want to know how severe are the following warnings.

LINK : warning LNK4222: exported symbol 'DllCanUnloadNow' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllGetClassObject' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllRegisterServer' should not be assigned an ordinal
LINK : warning LNK4222: exported symbol 'DllUnregisterServer' should not be assigned an ordinal

LINK : warning LNK4089: all references to 'SHELL32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'USER32.dll' discarded by /OPT:REF

Will ignoring the above cause any runtime problems? why?

Altman80
November 5th, 2004, 09:22 AM
I can't say I am an expert at C++ but I did have the same problem. I found this MSDN site that may help though. I just did what it said and took out the @1 and @2 and so on for those lines and I don't get the warning.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/vcerrLinkerToolsWarningLNK4222.asp

Altman80
November 5th, 2004, 09:27 AM
OH and as far as the 4089 warning from what I am reading it is saying that you are not accessing anything in those dll's. So you can either ignore the warning until you use it, or you can remove those dlls.

Mutilated1
November 8th, 2004, 03:41 PM
The warning 4222 is probably because your project contains a .DEF file. You can safely delete it if you want the warnings to go away, or you can ignore them its harmless.

The 4089 you can ignore its harmless, but if you want it to go away, then don't use /OPT:REF on the linker or don't link to shell32.lib and user32.lib.