Compiling spring (mingw and visual studio 7/8)
Moderator: Moderators
Re: Compiling spring (mingw and visual studio 7/8)
I didn't touch NTai, it compiled fine (note that I don't use VS for spring compiles.) Single-include strategy in KAIs made it quite a puzzle.
As for MSVC not understanding that cmath should put things in namespace std... that's just fail. I hope it's not as bad as it sounds.
As for MSVC not understanding that cmath should put things in namespace std... that's just fail. I hope it's not as bad as it sounds.
Re: Compiling spring (mingw and visual studio 7/8)
Could anyone add such a compaibility header? I would do it myself if I knew what to do...
And what about the other error messages - can anyone actually build spring with vsnet 2005??
And what about the other error messages - can anyone actually build spring with vsnet 2005??
submarine wrote:Code: Select all
1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : error C2143: syntax error : missing ',' before '&' 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(65) : error C2065: 'overload_rep' : undeclared identifier 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2923: 'std::vector' : 'overload_rep' is not a valid template type argument for parameter '_Ty' 1> d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(51) : see declaration of 'overload_rep' 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2663: 'std::vector<_Ty,_Alloc>::begin' : 2 overloads have no legal conversion for 'this' pointer 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2663: 'std::vector<_Ty,_Alloc>::end' : 2 overloads have no legal conversion for 'this' pointer 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(53) : error C2065: 'o' : undeclared identifier 1>d:\Spiele\TA Spring Source\rts\lib\luabind\luabind/detail/method_rep.hpp(54) : error C2663: 'std::vector<_Ty,_Alloc>::end' : 2 overloads have no legal conversion for 'this' pointer
Re: Compiling spring (mingw and visual studio 7/8)
I'll try to do something about it today, luabind is a freaking fragile piece of code and it's possible that I broke it for msvc when I made it to work with gcc 4.3.
Re: Compiling spring (mingw and visual studio 7/8)
Considering fnordia is the one who used luabind whereas trepan didnt use it iirc couldn't you just factor luabind out?
Re: Compiling spring (mingw and visual studio 7/8)
The LUA start(mission) scripts depend on it.
Don't think it's really trivial to redo it without (ie. factor it out), but I would support it. (because with all the fancy C++ it causes more headaches than it solves)
Don't think it's really trivial to redo it without (ie. factor it out), but I would support it. (because with all the fancy C++ it causes more headaches than it solves)
Re: Compiling spring (mingw and visual studio 7/8)
I think I fixed the msvc std::math errors (don't want to install platform sdk to find out if spring works, but those errors no longer show up.)
No idea how to reproduce luabind errors.
No idea how to reproduce luabind errors.
Re: Compiling spring (mingw and visual studio 7/8)
ok I fixed another std:: problem in GameServer.cpp, someone has to fix the LUA part now...
Re: Compiling spring (mingw and visual studio 7/8)
describe how to reproduce those errors plz
Re: Compiling spring (mingw and visual studio 7/8)
I'm looking at them, I have them too. (I can reproduce them just by pressing build..., but apparently some setting we don't know about influences this. I have PSDK & 2 DX SDKs installed, might have to do with it...)
I already tried adding #undef add_overload, but that didn't work.
EDIT: the header that contains struct overload_rep isn't included :s
I added "#error moo" and I got no error about that.
EDIT 2: hmm that seems more MSVC weirdness. it does see the #error but doesn't get around to showing it apparently :s I figured out it somehow manages to get the struct overload_rep definition after the add_overload method, which needs the overload_rep definition...
EDIT 3: ... and found the guilty lines of code, in overload_rep.hpp:
This causes an #include cyclic dependency which causes the classes to be put in the preprocessed file in the wrong order.
Now testing whether it compiles without this.
imbaczek: maybe the boost you use for MSVC doesn't have BOOST_MSVC #defined?
I already tried adding #undef add_overload, but that didn't work.
EDIT: the header that contains struct overload_rep isn't included :s
I added "#error moo" and I got no error about that.
EDIT 2: hmm that seems more MSVC weirdness. it does see the #error but doesn't get around to showing it apparently :s I figured out it somehow manages to get the struct overload_rep definition after the add_overload method, which needs the overload_rep definition...
EDIT 3: ... and found the guilty lines of code, in overload_rep.hpp:
Code: Select all
// actually, gcc cannot see pointer_converters before it sees class_rep
#if defined(BOOST_MSVC) // || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3)
#include <luabind/detail/policy.hpp>
#endif
Now testing whether it compiles without this.
imbaczek: maybe the boost you use for MSVC doesn't have BOOST_MSVC #defined?
Re: Compiling spring (mingw and visual studio 7/8)
*bump*
fixed now
fixed now
Re: Compiling spring (mingw and visual studio 7/8)
It actually crossed my mind that this line has something to do with the error, but couldn't prove it. Anyways, gcc's error messages weren't better ^^
Re: Compiling spring (mingw and visual studio 7/8)
Hey, new here, but I just thought I'd pipe in and say that I'm using VC9 Express and Windows SDK and of course got the error above. I fixed it by changing the definition of EnumModules to:lurker wrote:Thank you very much for this information. I installed VC9, and that is one of two errors that keep it from compiling.pentup wrote:Hello, I'm new around here. I used to be a huge TA fan, and recently found out about spring, so decided to take a look at it. I tried compiling it using VC8 and the Windows SDK (which I believe replaces the PlatformSDK) and got the following error:
After it failed, I downloaded the latest version of the PlatformSDK and everything compiled fine. I just wanted to let somebody know for future compatibility or whatever, that the current code doesn't compile (out of the box, at least) with the new Windows SDK.Code: Select all
CrashHandler.cpp ..\..\System\Platform\Win\CrashHandler.cpp(91) : warning C4312: 'type cast' : conversion from 'DWORD' to 'HINSTANCE' of greater size ..\..\System\Platform\Win\CrashHandler.cpp(134) : error C2664: 'SymEnumerateModules' : cannot convert parameter 2 from 'BOOL (__stdcall *)(LPSTR,DWORD,PVOID)' to 'PSYM_ENUMMODULES_CALLBACK' None of the functions with this name in scope match the target type
static BOOL CALLBACK EnumModules(PCSTR moduleName, ULONG baseOfDll, PVOID userContext)
which seems to have worked(not sure why the compiler refused to convert for me)
Still working on this other nasty error. I'll update if i figure it out.
**UPDATE: So I think I fixed the other error too. It was an ambiguous call that for some reason the compiler couldn't figure out based on namespace. I updated line 91 in has_get_pointer.hpp from
value=sizeof(has_get_pointer_::check((get_pointer(x),0) )) == 1
to
value=sizeof(has_get_pointer_::check((luabind::detail::has_get_pointer_::get_pointer(x),0) )) == 1
and it seems to be compiling fine. Still having trouble linking. As before, I'll continue to update as I work through this :)
Re: Compiling spring (mingw and visual studio 7/8)
I can't seem to configure scons, it keeps saying that it can't find gcc when it's trying to determine the version. I've tried a couple of different values in the environment variables, anyone had the same problem?
Nvm, fixed itself
Nvm, fixed itself

Re: Compiling spring (mingw and visual studio 7/8)
Scons stopped working
It compiled earlier without any problems. Anyone know what happened and how to fix it?

Code: Select all
scons: Reading SConscript files ...
make: *** No targets specified and no makefile found. Stop.
mingw32-make: *** No targets specified and no makefile found. Stop.
Failed building streflop!
Re: Compiling spring (mingw and visual studio 7/8)
Did you run it from the right folder?
Re: Compiling spring (mingw and visual studio 7/8)
I run it in my Spring source folder, it compiled several times earlier, but now i am getting the same message every time :/
Re: Compiling spring (mingw and visual studio 7/8)
try reconfigure?
Re: Compiling spring (mingw and visual studio 7/8)
You mean "scons configure" ? Tried it several times, it says:
and "scons" still doesn't work...
Code: Select all
(...)
Everything seems OK. Run `scons' now to build.
(...)
Re: Compiling spring (mingw and visual studio 7/8)
Ok I deleted \build, \rts\build\scons, \SConstruct in my Spring source folder, then obtained them again from SVN + redownloaded mingwlibs + uninstalled scons and installed it back and it finally works!!!
at least i didn't have to format my disk... :)
Now I have to wait only about 1 hour until it all compiles, then I can start testing my patch again...

at least i didn't have to format my disk... :)
Now I have to wait only about 1 hour until it all compiles, then I can start testing my patch again...

Re: Compiling spring (mingw and visual studio 7/8)
if you have dual core, use scons -j2 for parallel compiles.