MSVC compiling problem?
-
MagickPanda
- Rookie

- Posts: 17
- Joined: 26 Oct 2010, 17:21
MSVC compiling problem?
I grabbed trunk from svn and used MSVC 2005 to compile, all were ok except a few libs were in MSVC 2008 format, so it failed at linking process.
Then I tried to compile with MSVC 2010 express with VC08 project file, there were several windows-specific pointer casting errors in code, plus all bison/flex command returns error code 1 in MSVC, I fixed the errors in code and manually created .c/.h files from .l/.y files, though there is 1 pair of files called warzone2100.tab.c/warzone2100.tab.h I don't know which folder to put them(I can't remember if original warzone sourcecode has them or not). So it always fails at making warzone2100.tab.c/h from MSVC. Can anyone confirm compiling from MSVC is indeed broken or am I doing anything wrong?
Thanks.
Then I tried to compile with MSVC 2010 express with VC08 project file, there were several windows-specific pointer casting errors in code, plus all bison/flex command returns error code 1 in MSVC, I fixed the errors in code and manually created .c/.h files from .l/.y files, though there is 1 pair of files called warzone2100.tab.c/warzone2100.tab.h I don't know which folder to put them(I can't remember if original warzone sourcecode has them or not). So it always fails at making warzone2100.tab.c/h from MSVC. Can anyone confirm compiling from MSVC is indeed broken or am I doing anything wrong?
Thanks.
Re: MSVC compiling problem?
Hmm.. I've never encountered those file names before. What was .l/.y source names?MagickPanda wrote:though there is 1 pair of files called warzone2100.tab.c/warzone2100.tab.h I don't know which folder to put them(I can't remember if original warzone sourcecode has them or not)
Should be like that:
\mainline\lib\framework\resource_parser.y/.l
\mainline\lib\framework\strres_parser.y/.l
\mainline\lib\gamelib\audp_parser.y/.l
\mainline\lib\script\chat_parser.y/.l
\mainline\lib\script\script_parser.y/.l
\mainline\src\message_parser.y/.l
\mainline\src\scriptvals_parser.y/.l
\mainline\src\level_lexer.l
Try looking at #1881 ticket...MagickPanda wrote:Can anyone confirm compiling from MSVC is indeed broken or am I doing anything wrong?
P.S.
If you simply want to develop with some good IDE then I can share project files for QtCreator.
- milo christiansen
- Regular

- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: MSVC compiling problem?
Project files for qt creator? Yay!!!!!
Can I have a copy? please?
Can I have a copy? please?
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
Re: MSVC compiling problem?
Here you go...
For <2.3-with-new-textures,3.0,whatever it's called>: You'll need MinGW-devpkg, Bison, Flex and Qt (I'm fine with MinGW version qt-sdk-win-opensource-2010.05.exe).
It's a homebrew version so two tweaks will be required:
- In case they aren't already visible on system level, you should add Flex and Bison path to PATH in Projects->Build Settings->Build Environment.
- First build will fail since there is no 'src/autorevision.h' was generated automatically. You can do manually by running '\build_tools\autorevision\autorevision.exe +cstr -v <output dir>' and moving resulting file into 'src' dir.
That should be all for now. I have a version for SVN trunk, but most likely it's not useful for git 'mainline'...
While it's possible, but I haven't tried to use it with MSVC compiler or on Linux.
For <2.3-with-new-textures,3.0,whatever it's called>: You'll need MinGW-devpkg, Bison, Flex and Qt (I'm fine with MinGW version qt-sdk-win-opensource-2010.05.exe).
It's a homebrew version so two tweaks will be required:
- In case they aren't already visible on system level, you should add Flex and Bison path to PATH in Projects->Build Settings->Build Environment.
- First build will fail since there is no 'src/autorevision.h' was generated automatically. You can do manually by running '\build_tools\autorevision\autorevision.exe +cstr -v <output dir>' and moving resulting file into 'src' dir.
That should be all for now. I have a version for SVN trunk, but most likely it's not useful for git 'mainline'...
While it's possible, but I haven't tried to use it with MSVC compiler or on Linux.
Re: MSVC compiling problem?
I believe I am the only one who used VS2k5 (still using actually...) You do need to compile all the libs for VS2k5, I just haven't had the time to keep the dev package current.MagickPanda wrote:I grabbed trunk from svn and used MSVC 2005 to compile, all were ok except a few libs were in MSVC 2008 format, so it failed at linking process.
Then I tried to compile with MSVC 2010 express with VC08 project file, there were several windows-specific pointer casting errors in code, plus all bison/flex command returns error code 1 in MSVC, I fixed the errors in code and manually created .c/.h files from .l/.y files, though there is 1 pair of files called warzone2100.tab.c/warzone2100.tab.h I don't know which folder to put them(I can't remember if original warzone sourcecode has them or not). So it always fails at making warzone2100.tab.c/h from MSVC. Can anyone confirm compiling from MSVC is indeed broken or am I doing anything wrong?
Thanks.
i-Nod used VS2k8 and mingw I think it was.
I doubt anyone has update the makefiles for mingw either.
That is how MSVC generates them via the rules file.i-NoD wrote:Hmm.. I've never encountered those file names before. What was .l/.y source names?MagickPanda wrote:though there is 1 pair of files called warzone2100.tab.c/warzone2100.tab.h I don't know which folder to put them(I can't remember if original warzone sourcecode has them or not)
Hey i-Nod, where are you hiding ?P.S.
If you simply want to develop with some good IDE then I can share project files for QtCreator.
You got anything cooking for Warzone ?
and it ends here.
Re: MSVC compiling problem?
MSVC is now more or less a dead horse IMO, so I'm almost exclusively using MinGW-based QtCreator.Buginator wrote:i-Nod used VS2k8 and mingw I think it was.
I doubt anyone has update the makefiles for mingw either.
Well.. Now I recall smth similar with bison/flex behavior when I was creating Qt projects...Buginator wrote:That is how MSVC generates them via the rules file.
Me? *still invisible* No, no... I'm not hereBuginator wrote: Hey i-Nod, where are you hiding ?
You got anything cooking for Warzone ?
One nice thingy is in progress, but I dunno if it will work out with current widgets...
-
MagickPanda
- Rookie

- Posts: 17
- Joined: 26 Oct 2010, 17:21
Re: MSVC compiling problem?
Thanks for the help, Buginator and iNod.
I have both 2005 and 2010 installed.
2005 project file seems to be less troublesome, it failed because the libs from newest devpkg is compiled for 2010 MSVC like you said.
2010 gives alot more problems compare to 2005.
I am not a fan of mingw though, back when wz2100 uses msys+mingw to build under windows, the make files got broken every few commits.
Maybe I will try to get libs for 2005, since compiling/downloading a libs is easier and faster than waiting 2010 problems to be addressed.
I have both 2005 and 2010 installed.
2005 project file seems to be less troublesome, it failed because the libs from newest devpkg is compiled for 2010 MSVC like you said.
2010 gives alot more problems compare to 2005.
I am not a fan of mingw though, back when wz2100 uses msys+mingw to build under windows, the make files got broken every few commits.
Maybe I will try to get libs for 2005, since compiling/downloading a libs is easier and faster than waiting 2010 problems to be addressed.
- milo christiansen
- Regular

- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: MSVC compiling problem?
If these work, your my hero!!!i-NoD wrote:Here you go...
Can I have the ones for trunk too?
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual
Re: MSVC compiling problem?
Old ones, no guaranties at all 
Re: MSVC compiling problem?
You should come on IRC sometime and talk about it!i-NoD wrote:One nice thingy is in progress, but I dunno if it will work out with current widgets...
- milo christiansen
- Regular

- Posts: 749
- Joined: 02 Jun 2009, 21:23
- Location: Perrinton Michigan
Re: MSVC compiling problem?
Thank you i-Nod!!!
In general, if you see glowing, pulsating things in the game, you should click on them.
- Demigod Game Ganual
- Demigod Game Ganual


