AGS.Native linker errors.

Started by monkey0506, Tue 15/10/2013 05:41:06

Previous topic - Next topic

monkey0506

When attempting to build AGS.Native, I get a lot of linker errors.

I'm getting error LNK2038 because of an apparent mismatch on the runtime library setting ("value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'"). If I try to change AGS.Native to /MT (static linking) then I get an error that /MT is incompatible with /clr. If I instead change Common.Lib and Compiler.Lib to /MD (dynamic linking) then this error goes away, but the rest of the linker errors remain (a bunch of unresolved external symbols from the object files).

Does anyone know why I'm getting these errors, and how to fix them? Presumably I shouldn't have to be changing the linker flags on these projects, but I'm trying to determine why the linker is failing in the first place.

Crimson Wizard

#1
I believe you build with MSVS 2012?
There were problems when building Native with anything but 2008 SP1, usually related to linking third-party libraries.

Here are few older discussions that mention this problem:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=46804.msg636448363#msg636448363
http://www.adventuregamestudio.co.uk/forums/index.php?topic=46847.msg630136#msg630136
http://www.adventuregamestudio.co.uk/forums/index.php?topic=48009.0

JJS once mentioned it is possible to re-build allegro libraries in 2012. I suppose that we should not have pre-built libs at all (since people may use different toolset). Well, we never got to change that. Organization again... uh-huh. :(

I think the quickest workaround may be:
Quote from: Crimson Wizard on Sun 23/09/2012 18:37:55
You may install minimal version of 2008 (Express) and still work in 2010 by doing this:
Quote
Open Project properties for the Engine project, "General" -> "Platform Toolset" -> should be set to v90.
Hopefully that'll work for AGS.Native too. Unfortunately, I can't remember if I ever tried myself.

monkey0506

Hmmm... I didn't think that was related to AGS.Native, but you're probably right then. I'll need to acquire a full version of VS2008 after all.

SMF spam blocked by CleanTalk