Page 1 of 1

MSVC compiling problem?

Posted: 29 Oct 2010, 17:29
by MagickPanda
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.

Re: MSVC compiling problem?

Posted: 29 Oct 2010, 22:16
by i-NoD
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)
Hmm.. I've never encountered those file names before. What was .l/.y source names?

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
MagickPanda wrote:Can anyone confirm compiling from MSVC is indeed broken or am I doing anything wrong?
Try looking at #1881 ticket...

P.S.
If you simply want to develop with some good IDE then I can share project files for QtCreator.

Re: MSVC compiling problem?

Posted: 30 Oct 2010, 18:46
by milo christiansen
Project files for qt creator? Yay!!!!!

Can I have a copy? please?

Re: MSVC compiling problem?

Posted: 30 Oct 2010, 20:33
by i-NoD
Here you go...
For <2.3-with-new-textures,3.0,whatever it's called>:
3.0-pros.zip
(9.93 KiB) Downloaded 292 times
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?

Posted: 31 Oct 2010, 04:59
by Buginator
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 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.

i-Nod used VS2k8 and mingw I think it was.
I doubt anyone has update the makefiles for mingw either.
i-NoD wrote:
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)
Hmm.. I've never encountered those file names before. What was .l/.y source names?
That is how MSVC generates them via the rules file.
P.S.
If you simply want to develop with some good IDE then I can share project files for QtCreator.
Hey i-Nod, where are you hiding ? ;)
You got anything cooking for Warzone ?

Re: MSVC compiling problem?

Posted: 31 Oct 2010, 16:04
by i-NoD
Buginator wrote:i-Nod used VS2k8 and mingw I think it was.
I doubt anyone has update the makefiles for mingw either.
MSVC is now more or less a dead horse IMO, so I'm almost exclusively using MinGW-based QtCreator.
Buginator wrote:That is how MSVC generates them via the rules file.
Well.. Now I recall smth similar with bison/flex behavior when I was creating Qt projects...
Buginator wrote: Hey i-Nod, where are you hiding ? ;)
You got anything cooking for Warzone ?
Me? *still invisible* No, no... I'm not here XD

One nice thingy is in progress, but I dunno if it will work out with current widgets...

Re: MSVC compiling problem?

Posted: 03 Nov 2010, 18:26
by MagickPanda
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. :shock:

Re: MSVC compiling problem?

Posted: 03 Nov 2010, 19:27
by milo christiansen
i-NoD wrote:Here you go...
If these work, your my hero!!! :P :lol2:

Can I have the ones for trunk too?

Re: MSVC compiling problem?

Posted: 08 Nov 2010, 22:03
by i-NoD
trunk-pros.zip
(19.19 KiB) Downloaded 311 times
Old ones, no guaranties at all :wink:

Re: MSVC compiling problem?

Posted: 08 Nov 2010, 23:18
by Safety0ff
i-NoD wrote:One nice thingy is in progress, but I dunno if it will work out with current widgets...
You should come on IRC sometime and talk about it!

Re: MSVC compiling problem?

Posted: 09 Nov 2010, 19:04
by milo christiansen
Thank you i-Nod!!!