Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Turey on June 24, 2007, 05:09:40 pm
-
I picked up Microsoft Visual Studio 2005 Standard Edition (Academic version) recently, and I've almost got it compiling FSO.
First, I tried the MSVC2005 project. That failed miserably. It couldn't find any of the headers. Then I converted the MSVC6 project, and that sort of worked. After fixing a pair of little bugs (see my commit from today), it started complaining about quartz.lib. I took it out of the included library list, to see if I could just ignore it. It then gave me this (http://www.fsoinstaller.com/error.txt). Any help?
Note that I never had any problems with compiling on Linux with GCC.
-
Thanks to some help from Goob, I've gotten a bit further. I've added code.lib to the libraries for FRED and FreeSpace2, and taken out linci.lib. I now get this error on all three projects:
BSCMAKE: error BK1513 : nonincremental update requires all .SBR files
Also, both the FreeSpace2 and FRED projects gives me this:
code.lib(collideshipship.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Ship" (?l_Ship@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collidedebrisship.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Ship" (?l_Ship@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collideshipweapon.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Ship" (?l_Ship@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(windebug.obj) : error LNK2019: unresolved external symbol "void __cdecl ade_stackdump(struct lua_State *,char *)" (?ade_stackdump@@YAXPAUlua_State@@PAD@Z) referenced in function "void __cdecl LuaError(struct lua_State *,char *,...)" (?LuaError@@YAXPAUlua_State@@PADZZ)
code.lib(windebug.obj) : error LNK2001: unresolved external symbol "struct lua_Debug Ade_debug_info" (?Ade_debug_info@@3Ulua_Debug@@A)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "public: int __thiscall script_state::CreateLuaState(void)" (?CreateLuaState@script_state@@QAEHXZ) referenced in function "void __cdecl script_init(void)" (?script_init@@YAXXZ)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "int __cdecl ade_set_object_with_breed(struct lua_State *,int)" (?ade_set_object_with_breed@@YAHPAUlua_State@@H@Z) referenced in function "public: void __thiscall script_state::SetHookObject(char *,int)" (?SetHookObject@script_state@@QAEXPADH@Z)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "int __cdecl ade_set_args(struct lua_State *,char *,...)" (?ade_set_args@@YAHPAUlua_State@@PADZZ) referenced in function "public: void __thiscall script_state::SetHookVar(char *,char,void *)" (?SetHookVar@script_state@@QAEXPADDPAX@Z)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "int __cdecl ade_get_args(struct lua_State *,char *,...)" (?ade_get_args@@YAHPAUlua_State@@PADZZ) referenced in function "public: bool __thiscall script_state::GetHookVar(char *,char,void *)" (?GetHookVar@script_state@@QAE_NPADDPAX@Z)
code.lib(scripting.obj) : error LNK2001: unresolved external symbol "bool Ade_get_args_lfunction" (?Ade_get_args_lfunction@@3_NA)
code.lib(scripting.obj) : error LNK2001: unresolved external symbol "int Ade_get_args_skip" (?Ade_get_args_skip@@3HA)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "int __cdecl ade_friendly_error(struct lua_State *)" (?ade_friendly_error@@YAHPAUlua_State@@@Z) referenced in function "private: int __thiscall script_state::RunBytecodeSub(int,int,char,void *)" (?RunBytecodeSub@script_state@@AAEHHHDPAX@Z)
code.lib(scripting.obj) : error LNK2019: unresolved external symbol "private: void __thiscall script_state::OutputLuaMeta(struct _iobuf *)" (?OutputLuaMeta@script_state@@AAEXPAU_iobuf@@@Z) referenced in function "public: int __thiscall script_state::OutputMeta(char *)" (?OutputMeta@script_state@@QAEHPAD@Z)
code.lib(collideweaponweapon.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Weapon" (?l_Weapon@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collidedebrisweapon.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Weapon" (?l_Weapon@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collideshipweapon.obj) : error LNK2019: unresolved external symbol "class ade_obj<struct object_h> l_Weapon" (?l_Weapon@@3V?$ade_obj@Uobject_h@@@@A) referenced in function "void __cdecl ship_weapon_do_hit_stuff(struct object *,struct object *,struct vec3d *,struct vec3d *,int,int,struct vec3d)" (?ship_weapon_do_hit_stuff@@YAXPAUobject@@0PAUvec3d@@1HHU2@@Z)
code.lib(collidedebrisship.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Debris" (?l_Debris@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collidedebrisweapon.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Debris" (?l_Debris@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collidedebrisship.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Asteroid" (?l_Asteroid@@3V?$ade_obj@Uobject_h@@@@A)
code.lib(collidedebrisweapon.obj) : error LNK2001: unresolved external symbol "class ade_obj<struct object_h> l_Asteroid" (?l_Asteroid@@3V?$ade_obj@Uobject_h@@@@A)
Debug\fs2_open_d.exe : fatal error LNK1120: 14 unresolved externals
-
Sounds like you're missing parse/lua.cpp or have USE_LUA disabled (If that's still in CVS).
-
Sounds like you're missing parse/lua.cpp or have USE_LUA disabled (If that's still in CVS).
Close. The project file thought they were in parse/scripting/ instead of just parse/. Trying another compile now.
EDIT: Nope. Still not working.
-
Hmm. Seems I forgot to mention the existence of libjpeg.dsp and liblua.dsp, which produce dependencies just like code.dsp produces code.lib.
Also, I have no idea how to solve that browse info bug, but you can bypass it by disabling browse info on some (or all) of the projects.
-
Hmm. Seems I forgot to mention the existence of libjpeg.dsp and liblua.dsp, which produce dependencies just like code.dsp produces code.lib.
Way ahead of you, but same error.
-
HAHA!
It took many, many hours of playing around with obscure, confusing project settings, but it finally compiles!
I've still got some testing and cleaning up to do, but expect a commit within 24 hours.
EDIT: Crap. And now, without changing anything, it doesn't work again.
EDIT2: I'm getting nowhere. Starting over with clean convert of MSVC 6 files, see if I can get back to a clean compile.
-
Alright, it compiles, but I had to rename either fs2_open/code/parse/lua.cpp or fs2_open/lua/lua.cpp to another name. How do I get this name change reflected in CVS?
-
The version in CVS now compiles Debug without problems. I'm still working on release.
-
If vs2005 is giving errors from files that built properly on previous vs editions, or on other compilers, try checking the project options, and tinkering with the config settings. Generally, cuz those are all linking errors, tinkering around with those settings should work. You could also try changing it so that the project uses a multi-byte character set.
-
If vs2005 is giving errors from files that built properly on previous vs editions, or on other compilers, try checking the project options, and tinkering with the config settings. Generally, cuz those are all linking errors, tinkering around with those settings should work. You could also try changing it so that the project uses a multi-byte character set.
Actually, the problem seems to be that MSVC2005 is just stupid, as it builds lua.obj from fs2_open/lua/lua.cpp, then builds a different lua.obj from fs2_open/code/parse/lua.cpp, then overwrites the first lua.obj with the second, and BAM! Unresolved externals. I tried changing the output folders, but it didn't seem to work.
The important part is that it compiles. IT can be cleaned up later.
-
Well the other important part is that it runs, too... ;)
I've been having your same struggles, and when I finally got the 3_6_9 branch to compile, it crashes upon game load. No idea why, because I did get HEAD to work just fine. I'll try your project settings to see if you've done anything different.
-
Heh. That kind of problems a real pain. Idk why vs05 builds like that. Still can't figure it out.
-
I've been having your same struggles, and when I finally got the 3_6_9 branch to compile, it crashes upon game load. No idea why, because I did get HEAD to work just fine. I'll try your project settings to see if you've done anything different.
I've found that I'm getting problems with malloc. I don't know why, it's not my code or my machine or even VC2005. It just randomly happens.
-
i doubt that errors will randomly happen. I'd try running through the code and see if all the variables are defined, cuz usually that causes 'random errors'.
-
The thing is that MSVC6 doesn't have these problems. I haven't had a malloc error in a couple of years.
-
current projects in CVS for MSCV2005 do not compile
(liblua)
LIB: fatal error LNK1181: cannot open input file '.\Debug\Profile\lua2.obj'
BSCMAKE: error BK1506 : cannot open file '.\debug\profile\lua\lua2.sbr': o such file or directory
(code)
LIB : fatal error LNK1811: cannot open input file '.\Debug\liblua_d.lib'
(Fred2)
LINK : fatal error LNK1104: cannot open file 'code.lib'
LINK : fatal error LNK1104: cannot open file '.\Debug\liblua_d.lib'
FRED2's link error is probably because code.lib isn't getting build because code.lib's build error
oh.. fred2 gets a billion warnings for
"WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)"
[edit]
i did add _CRT_NOSECURE_DEPRECIATE_ or whatever it is to all of the projects that needed it and commited
[edit2]
or not... my write access to the repo is disabled!
-
current projects in CVS for MSCV2005 do not compile
(liblua)
LIB: fatal error LNK1181: cannot open input file '.\Debug\Profile\lua2.obj'
BSCMAKE: error BK1506 : cannot open file '.\debug\profile\lua\lua2.sbr': o such file or directory
(code)
LIB : fatal error LNK1811: cannot open input file '.\Debug\liblua_d.lib'
(Fred2)
LINK : fatal error LNK1104: cannot open file 'code.lib'
LINK : fatal error LNK1104: cannot open file '.\Debug\liblua_d.lib'
FRED2's link error is probably because code.lib isn't getting build because code.lib's build error
oh.. fred2 gets a billion warnings for
"WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)"
[edit]
i did add _CRT_NOSECURE_DEPRECIATE_ or whatever it is to all of the projects that needed it and commited
[edit2]
or not... my write access to the repo is disabled!
Try reading the readme next time. Rename fs2_open/lua/lua.cpp to lua2.cpp, otherwise it causes problems cause it has the same name as fs2_open/code/parse/lua.cpp.
-
commit that to the repo
-
Why not rename code/parse/lua.cpp to parselua.cpp or something similar, instead of changing the lua.cpp in the sdk?
-
On a side note, compiling files created/edited with MVS 2003 might result in some errors. I should know.
-
Feel free to try. We can always use another coder. :)
-
Heh. I'll take a look at the code when i have free time.
-
patches are in the pipeline for 3.6.9 MSVC2005 to be fixed, [the ones in] head are currently working
-
You patched the code so that it compiles cleanly with vs 2005?
-
it's not the code that is the problem it's the project files.. and yes there are patches in the pipeline.. they're just not all in cvs yet
-
due to some hackery in lua.cpp 3.6.9 cannot be compiled (And have it not crash) with MSVC 2005 until such a time as WMC backports his scripting updates from HEAD to 3.6.9
-
found a way to disable the problematic feature of MSCV 2005... 3.6.9 is all good
-
Huzzah! How? I want to commit some stuff to 3.6.9 but I'm holding off until I can test it, so please let us know what to disable!
-
perform a CVS update.. fixed project files are now in the repository