|
From: Leslie N. <les...@fm...> - 2007-12-06 12:39:38
|
Hi, I am trying to build wxLua with static runtime libs using VS2005. I want to use static libs because I have had a number of issues distributing the runtime libs (vcredist_x86.exe). If I set RUNTIME_LIBS = static in makefile.vc then the compiler command line ends up with /M instead of /MT. Looking at wxlua/apps/build/msw/makefile.vc and /modules/build/makefile.vc I see the following lines: !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_11 = $(__THREADING) !endif It appears that __THREADING is not defined anywhere. Changing each occurrence of this to : !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_11 = T !endif causes the correct /MT switch to be output but I still get errors like the following when it tries to link lua.exe: MSVCRT.lib(MSVCR80.dll) : error LNK2005: _strchr already defined in LIBCMT.lib(strchr.obj) MSVCRT.lib(MSVCR80.dll) : error LNK2005: __errno already defined in LIBCMT.lib(dosmap.obj) MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj) It looks like for some reason it is trying to link to both the static and runtime libs at the same time. Les |