1

I currently have a 32 bit dll that was created with Visual Studio 2003 in C++ using Managed Extensions. I'm now trying to compile a 64 bit version without having to upgrade to C++/CLI. I've been following the tutorial at this location. I'm getting the following error:

fatal error C1197: cannot reference 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll' as the progam has already referenced 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll'

I can't figure out what is referencing the .NET 2.0 version of the dll.

Kent Fredric
  • 56,416
  • 14
  • 107
  • 150
Richard Nienaber
  • 10,324
  • 6
  • 55
  • 66
  • 64 bits with VS2003? VS2003 didn't come with a 64 bits cross compiler?!? – KTC Nov 05 '08 at 15:46
  • 3
    Indeed. Apparently, you can download the Platform SDK (which contains a 64 bit compiler) and compile it within VS2003 (provided you start it with the right environment variables). – Richard Nienaber Nov 05 '08 at 15:50

2 Answers2

1

Do you manually call the .dll file in the code? Like in this?

#using "C:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll

If so, you can change this line to just:

#using "mscorlib.dll"
UberJumper
  • 20,245
  • 19
  • 69
  • 87
0

Are you including a library that links to a different version of mscorlib?

Are you specifying both the /clr option and doing a #using "mscorlib.dll" ?

Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636