Building AGS Native

Started by Calin Leafshade, Fri 12/04/2013 19:05:32

Previous topic - Next topic

Calin Leafshade

Ok, there are some things i want to fix in the AGS editor but I can't get AGS.Native to build. I get the following error:

Error   147   error LNK2001: unresolved external symbol __forceCRTManifestCUR   alfont_md_d.lib   AGS.Native

I assume its a library dependency or something since no one else seems to have reported the problem.

Can anyone help?

Crimson Wizard

#1
What version of MSVS do you have?

If you open alfont_md_d.lib (e.g. in notepad), you may find this line:
Quote/include:__forceCRTManifestCUR /manifestdependency:"type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.30729.1'

9.0.30729.1 - is the MSVS 2008 SP1. I have a suspicion you need to have exactly SP1 VC CRT headers and/or libs to link with that alfront_md_d.
Which may not be very good in general. Perhaps it is more correct for everyone to build his/her own allegro static libs. Maybe we should address this issue in the future.

Anyway, there's a preprocessor macro _BIND_TO_CURRENT_VCLIBS_VERSION=1 in AGS.Native project, which seems to be related with this. What will happen if you remove it, or write _BIND_TO_CURRENT_VCLIBS_VERSION=0 instead?
No, that is not a good advice; I think it is for letting SP1 to link with older VC libs (not sure).


EDIT:
I found this post by Pumaman:
Quote from: Pumaman on Fri 11/05/2012 23:50:27
Quote from: sonneveld on Thu 10/05/2012 05:48:44
- Do you have the source for alfont?  It looks like you changed the font rendering to only change blenders when the alpha level changes (as an optimisation) and possibly you used an older/simpler version of the set_height function?

Yep I'll try and dig it out, basically at some stage a new version of alfont changed the meaning of set_height but for backwards compatibility I didn't want this since it broke the font sizes that people were using in AGS, so I hacked it back to use its old-style font sizes.

So, basically these are fixed versions by CJ, which he compiled using MSVS 2008 SP1. BTW, did he upload the source for that library? I wonder is there any relation to Engine\libsrc\alfont-2.0.9\alfont.c?

Calin Leafshade

Ahh, I think i must not have SP1.

I will install the service pack and see if that helps.

In general though i dont think limiting compiling to a very specific version of the compiler is such a good idea and the solution should be made more general.

SMF spam blocked by CleanTalk