![]() |
|
Can't figure out Static Linking with Visual Studio .NET |
GameCreator
Member #2,541
July 2002
![]() |
Visual Studio .NET (edit: actually, it looks like it's Microsoft Visual C++ .NET) and I aren't getting along. I've been trying to set up a project for static linking without success. So I tried to make it easier on myself by converting Matthew's project: Who Let The Blocks Out from Dynamic to Static using this help page. No luck. So, here's my process with the hope that someone can catch something I did wrong. (By the way, I was able to compile it when I set it to profile. I couldn't do it as debug because it said it was missing some MS...80d.dll file which I couldn't find online but I could find the non d version of it.) - Downloaded source, extracted Only question is, on #5, do I replace the existing stuff with ALLEGRO_STATICLINK (it previously had WIN32,NDEBUG,_WINDOWS) or just add a comma and then that? Either way I get "fatal error LNK1262: link failed due to mismatched versions of 'C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\c2.dll' and LINK.EXE" So, how is it that the link didn't fail when I compiled it fine dynamically? Hmm. Any help would be really appreciated. For that matter, if anyone can simply point to some code (the simpler the better) that has the DSW file (or maybe the DSP file is enough?) that's already set up for Static Linking, that would work too. Worst case scenario, I'll work with Matthew's code and do dynamic but it'd be great to know what I'm doing wrong. Thanks.
|
A J
Member #3,025
December 2002
![]() |
Quote: Only question is, on #5, do I replace the existing stuff with ALLEGRO_STATICLINK (it previously had WIN32,NDEBUG,_WINDOWS) or just add a comma and then that? add a comma then the ALLEGRO_STATICLINK does C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin\c2.dll exist? do a clean before you start, possibly need to also delete the intermediate files. ___________________________ |
GameCreator
Member #2,541
July 2002
![]() |
Sounds like good advice. I made sure the Preprocessor Defintions had all four items c2.dll does exist under C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin, the same place where link.exe is. Did the clean. Wouldn't let me delete the .ncb as it said it's being used so I had to quit the program and delete it. The others either didn't exist or were taken care of by the clean. I then got back into the program and tried again but the same result came up ("link failed"). Thanks for the suggestions though.
|
A J
Member #3,025
December 2002
![]() |
check how many link.exe files you have on your pc check you PATH variables ___________________________ |
GameCreator
Member #2,541
July 2002
![]() |
I have other link.exe files on a different drive but they're not an issue (I had an old install on a different drive before I reformatted and installed Windows). I renamed all of them for the hell of it and tried again with the same result. Going to the Command Prompt and typing PATH results in this:
|
|