Total servers: 3
Backup server NL
Modern Warfare1.0 – 100lt
IP: 95.46.198.26
Game Mode: Death Match
Lives: 0
Max Kills: 15
Version: OpenLieroX 0.58 rc5
Players:
Hathat(0 lives, 6 kills)
Marten(0 lives, 2 kills)
80.186.170.22
Unknown
Unknown – 0lt
IP: 80.186.170.22
Game Mode:
Lives: 0
Max Kills: 0
Version: LieroX 0.56b
Players:
M0rtsHeaven
Modern Warfare1.0 – 20lt
IP: 84.251.82.159
Game Mode: Death Match
Lives: 0
Max Kills: 12
Version: OpenLieroX 0.58 rc5
Players:
Pages: 1 ... 3 4 [5] 6   Go Down

Author Topic: [HowTo] Compiling OLX on Windows for dummies  (Read 33231 times)

DarkCharlie

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #80 on: July 29, 2011, 11:16:18 am »
These files are missing in express versions of MSVC (don't ask me why...). They can be downloaded extra with MS Driver Development Kit but that's a big package for just a few files. In your case you can skip building breakpad (or just ignore the errors in this project), then right-click OpenLieroX project -> Properties -> C/C++ -> Preprocessor and to Preprocessor Definitions add NBREAKPAD.

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #81 on: July 29, 2011, 02:12:36 pm »
Nice. I'll try that and if compilation is successful I'll wikify it.

albert

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #82 on: July 29, 2011, 03:17:44 pm »
Btw., why are you doing:
Quote
4. Copied code to a working directory (c:\openlierox2)

Normally, the Git'ed directory is also my working directory.

Also, I would recommend that you get it also working with Breakpad because otherwise it will get complicated (you have to manage your copy of the MSVC project file and once the one in the Git repo is updated, you have to reconfigure your MSVC project and/or you might get merge conflicts).
« Last Edit: July 29, 2011, 03:20:24 pm by albert »

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #83 on: July 29, 2011, 04:01:55 pm »
Btw., why are you doing:
Quote
4. Copied code to a working directory (c:\openlierox2)
Normally, the Git'ed directory is also my working directory.

I sometimes work in a separate directory to maintain "original" code intact and later to use a merge tool to compare the changes between folders.

Well, Git provides some commands to clear changes in repository, but I do prefer using another less complicated (for me) VCS, like Mercurial, in copied directory.

albert

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #84 on: July 29, 2011, 08:33:44 pm »
I sometimes work in a separate directory to maintain "original" code intact and later to use a merge tool to compare the changes between folders.

There is `git diff` for that purpose. And you can just `git checkout -- <somefile/dir>` to revert and checkout a file again from current HEAD.

I don't really see how a very similar VCS (like Mercurial) in a separate directory make things any easier. :)

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #85 on: July 29, 2011, 08:54:45 pm »
I don't really see how a very similar VCS (like Mercurial) in a separate directory make things any easier. :)

I saw some Git manuals some graphics of it, but I do not understand some commands yet. I've to practice with Git workflow to learn more about :)

When it become more familiar to me, I'll work directly with it. Also I think "working twice" in commiting code could reduce commit error probability while I'm not sure on how to do some things in Git.

Maxxa

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #86 on: July 30, 2011, 04:11:21 pm »
if compliming means means someting like installing it didnt work

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #87 on: July 30, 2011, 05:03:50 pm »
if compliming means means someting like installing it didnt work

No, compiling is in another castle.

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #88 on: August 03, 2011, 05:15:58 am »
In your case you can skip building breakpad (or just ignore the errors in this project), then right-click OpenLieroX project -> Properties -> C/C++ -> Preprocessor and to Preprocessor Definitions add NBREAKPAD.

OLX Code 5 x 0 Me

Tried but not functioned.

These files are missing in express versions of MSVC (don't ask me why...). They can be downloaded extra with MS Driver Development Kit but that's a big package for just a few files.

Downloading Windows Driver Kit (WDK), 619MB...

DarkCharlie

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #89 on: August 03, 2011, 10:17:11 pm »
What were the errors?

antamm

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #90 on: October 03, 2012, 11:58:45 pm »
Hiya,

I've been trying to get OLX to compile on a 32 bit Windows 7 using Visual C++ 2010 Express and I'm running into loads of errors involving boost. It seems that I'm using the wrong boost files? I just downloaded the ones from the wiki article and went through all the steps described in the article.

Thanks for any help :)

Example errors :

Code: [Select]
1>D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(539): error C2780: 'bool boost::detail::function::basic_vtable1<R,T0>::assign_to(FunctionObj,boost::detail::function::function_buffer &,boost::detail::function::function_obj_tag)' : expects 3 arguments - 2 provided
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(599) : see declaration of 'boost::detail::function::basic_vtable1<R,T0>::assign_to'
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *
1>          ]

or (a longer error)

Code: [Select]
1>D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(539): error C2668: 'boost::mem_fn' : ambiguous call to overloaded function
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/bind/mem_fn_cc.hpp(15): could be 'boost::_mfi::mf0<R,T> boost::mem_fn<std::string,CWorm>(R (__thiscall CWorm::* )(void))'
1>          with
1>          [
1>              R=std::string,
1>              T=CWorm
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\xxmem_fn(32): or       'std::tr1::_Mem_fn1<_Rx,_Pmf,_Arg0> std::tr1::mem_fn<std::string,CWorm>(_Rx (__thiscall CWorm::* )(void))' [found using argument-dependent lookup]
1>          with
1>          [
1>              _Rx=std::string,
1>              _Pmf=std::string (__thiscall CWorm::* )(void),
1>              _Arg0=CWorm
1>          ]
1>          while trying to match the argument list '(std::basic_string<_Elem,_Traits,_Ax> )'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Ax=std::allocator<char>
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(492) : see reference to function template instantiation 'bool boost::detail::function::basic_vtable1<R,T0>::assign_to<F>(MemberPtr,boost::detail::function::function_buffer &,boost::detail::function::member_ptr_tag)' being compiled
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *,
1>              F=std::string (__thiscall CWorm::* )(void),
1>              MemberPtr=std::string (__thiscall CWorm::* )(void)
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(915) : see reference to function template instantiation 'bool boost::detail::function::basic_vtable1<R,T0>::assign_to<Functor>(F,boost::detail::function::function_buffer &)' being compiled
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *,
1>              Functor=std::string (__thiscall CWorm::* )(void),
1>              F=std::string (__thiscall CWorm::* )(void)
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(722) : see reference to function template instantiation 'void boost::function1<R,T0>::assign_to<Functor>(Functor)' being compiled
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *,
1>              Functor=std::string (__thiscall CWorm::* )(void)
1>          ]
1>          D:\Andre\Proged\Microsoft Visual Studio 10.0\VC\include\boost/function/function_template.hpp(1065) : see reference to function template instantiation 'boost::function1<R,T0>::function1<Functor>(Functor,int)' being compiled
1>          with
1>          [
1>              R=std::string,
1>              T0=CWorm *,
1>              Functor=std::string (__thiscall CWorm::* )(void)
1>          ]
1>          ..\..\src\client\DeprecatedGUI\Menu_Net_Host.cpp(1049) : see reference to function template instantiation 'boost::function<Signature>::function<std::string(__thiscall CWorm::* )(void)>(Functor,int)' being compiled
1>          with
1>          [
1>              Signature=std::string (CWorm *),
1>              Functor=std::string (__thiscall CWorm::* )(void)
1>          ]

Kurko

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #91 on: October 05, 2012, 07:47:32 pm »
I can't really help with that problem but as far as I remember compiling on Windows is quite messy. Have you modified the code or what's the reason for not using the binary package?

albert

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #92 on: October 07, 2012, 01:15:18 am »
What OLX version? Try the latest.

What Boost version? Try the latest.

MSVC always had problems. Mingw probably will work better. Although both will probably not fully work without hacks.

Sorry but there never really was a standard way to compile OLX on Windows. It always was messy and full of hacks. We really tried to find some standard way but Windows makes it quite hard/impossible.

antamm

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #93 on: October 07, 2012, 02:30:18 pm »
Thanks for the replies. Yeh, I tried updating everything I could find to the latest versions, but still no luck. So I ditched Windows, migrated to Linux and everything is compiling nicely now :)

kokbira

  • Gi Joe Brown Brazillian Rope-Flying Ant
  • LXA Part Time Adapt
  • *****
  • Schwartz: +23/-6
  • Offline Offline
  • Posts: 529
  • 3918 credits
  • View Inventory
  • Send Money To kokbira
  • ex-player (ex-Flip and ex-s00t clan member)
    • WWW
Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #94 on: December 14, 2012, 06:43:08 pm »
Is freealut no more available?

mast4461

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #95 on: December 24, 2012, 11:43:26 pm »
How a newcomer finally managed to compile OpenLieroX (OLX)

Greetings!

I have been trying to get OLX to compile for the better part of two days now. I am running 64 bit Windows 7 and using Microsoft Visual Studio 2010 Ultimate. I have branch 0.59 of the source code, from Git.

As detailed on the Wiki page (http://www.openlierox.net/wiki/index.php/Compiling_OpenLieroX_on_Windows) I chose Visual C++ 2010 Express (MSVC) and properly unzipped the dependencies file 'msvc2010_2010.04.21.zip' to the installation directory of MSVC.

After this setup you can, according to the Wiki page, load 'Game.vcxproj" in MSVC and then you are able to press F7 to compile or F5 to even run the game.

I ran into several compilation issues, solved the first few, switched to Microsoft Visual Studio 2010 Ultimate to solve some others and eventually got OLX to compile through various ugly ad-hoc solutions. Unfortunately though, the executable that eventually resulted immediately crashes with the error message "The application was unable to start correctly (0xc000007b).". Extremely disappointing, after so many hours.

Getting OLX to compile turned out to be way harder than I thought, and way harder than what it seems like if you read the Wiki page. I would like to try to spare other newcomers some time, confusion and frustration by walking through the issues you run into and some possible solutions that I have found. View this as what happens when a windows based intermediate programmer, new to C++, tries to get into the OLX-project.

This setup will be the starting point:
- Microsoft Visual Studio 2010 Ultimate, service pack 1. (I don't have the patience to go all the way back to Visual C++ 2010 Express)
   Project Properties->Configuration: Active(Debug)
- Dependencies file msvc2010_2010.04.21.zip unzipped to proper directory.

Now lets see my futile compilation attempts fail. I will ignore all warnings and only address the first error that occurrs in each compilation attempt.

    Compilation attempt #1
    ..\..\src\common\Networking.cpp(54): fatal error C1083: Cannot open include file: 'nl.h': No such file or directory
    'nl.h' is indeed included in the source (..\libs\hawknl\include) but 'Game.vcxproj' has the wrong 'Include Directories' specified, unless your sorce code is indeed located in 'C:\Users\Programmierung\Albert Zeyer\openlierox'. Go to 'Project->Properties->Configuration Properties->VC++ Directories' and add the proper include directory.

    Compilation attempt #2
    boost/function/function_template.hpp(539): error C2668: 'boost::mem_fn' : ambiguous call to overloaded function
    This can probably be solved by downloading the latest version of boost, although I tried that without success. The solution I'll use now is described here: https://svn.boost.org/trac/boost/ticket/4073. That is, prefix every instance of calls to 'mem_fn()' with 'boost::' in 'function_template.hpp'.

    Compilation attempt #3
    LINK : fatal error LNK1181: cannot open input file 'zlib.lib'
    Like in compilation attempt #1, 'zlib.lib' is also included in the source (..\build\msvc\libs), but not in a directory specified in 'Game.vcxproj'. Use the method from compilation attempt #1.

    Compilation attempt #4
    LINK : fatal error LNK1181: cannot open input file 'libvorbis.lib'
    No file with this name is present in the source code nor in the dependencies. Included in the dependencies is however a file called 'libvorbis_static.lib'. This is probably the same thing but with a different name. Rename this file to 'libvorbis.lib'.

    Compilation attempt #5
    LINK : fatal error LNK1181: cannot open input file 'libvorbisfile.lib'
    Just like compilation attempt #4, rename 'libvorbisfile_static.lib' to 'libvorbisfile.lib'.

    Compilation attempt #5
    LINK : fatal error LNK1181: cannot open input file 'libogg.lib'
    Just like compilation attempt #4, rename 'libogg_static.lib' to 'libogg.lib'.

    Compilation attempt #6
    LINK : fatal error LNK1181: cannot open input file 'libgd.lib'
    This file is not present in the dependencies (where it should be) nor in the source and there doesn't seem to be any 'libgd_static.lib' or similar, so we must probably find it somewhere else. Download 'Developer files' from http://gnuwin32.sourceforge.net/packages/gd.htm. The file is named 'gd-2.0.33-1-lib.zip'. Unzip this directory and copy the 'libgd.lib' to the directory where 'libvorbis.lib' is ocated.

    Compilation attempt #7
    Compilation succeeded! 'OpenLieroX_debug.exe' was created. :D

Ok great, now let's see me fail at executing this file.

    Execution attempt #1
    'The program can't start because curllib.dll is missing from your computer. Try reinstalling the program to fix this problem.'
    This file is not present in the source or in the dependencies. However, I found it in the installation directory of the distribution version of OpenLieroX 0.59. I tried to compile OpenLieroX.exe and place it in that installation directory.

    Execution attempt #2
    The screen goes black, just like it is supposed to be. Then the program crashes, without any error reports. Let's try with OpenLieroX_debug.exe (first place it in that installation directory) from the command line to see if it tells me why I get a crash.

    Execution attempt #3
    The screen goes black for a while, then the program crashes, without any error reports. The only thing similar to an error message now left in the command window is: 'n: stdin CLI support init failed: not implemented'
    Many other things are printed after that though, so I don't think that is what's causing the crash. I also get around 20 messages about unknown options defined in cfg/options.cfg looking like:
    'n: the option "Network.STUNServer" defined in cfg/options.cfg is unknown'


Here is the log file from the last execution:
Code: [Select]
H: OpenLieroX/0.59_beta10 is starting ...
n: Free memory: 3945 MB
n: Current time: Sun Dec 23 22:08:03 2012
n: Searchpaths (in this order):
n:   C:\Users\Martin\Documents/OpenLieroX
n:   .
n: Searchpaths finished.
n: Installing CrashHandler .. Win32 Exception Filter installed
n: Loading network texts... DONE
n: Loading taunts... DONE
n: Hello there, I am initializing me now...
n: SDL_VIDEODRIVER not set, setting to directx
n: setting video mode
n: ColorDepth: 32
n: VideoPostProcessor initialisation ... using Dummy video post processor
n: PixelFormat:
n:   BitsPerPixel: 32,  BytesPerPixel: 4
n:   R/G/B/A mask: ff/ff00/ff0000/ff000000
n:   R/G/B/A loss: 0/0/0/0
n:   Colorkey: 0,  Alpha: 255
n: using software surfaces
H: using OpenGL
n: video mode was set successfully
H: OpenAL lib initialized
n: SoundSystem initialised
n: Loading (5%): Initializing client and server
n: Loading (10%): Loading Gusanos engine
n: Allegro: SSE, MMX, no MMXExt
n: Lua: Registering as non-AUTH
n: Sfx::registerInConsole()
n: Gus con: <UNKNOWN COMMAND: P0_NAME>
n: Gus con: <UNKNOWN COMMAND: P1_NAME>
n: Gus con: <COULDN'T EXEC user.cfg>
Color Mask:       0xFEFEFE
Low Pixel Mask:   0x10101
QColor Mask:      0xFCFCFC
QLow Pixel Mask:  0x30303
n: Loading (15%): Initializing game entities
n: Loading (20%): Loading graphics
n: Loading (40%): Initializing console
n: Loading (45%): Loading sounds
n: Loading (55%): Loading player profiles
n: Initializing ready
n: Loading (70%): Initializing menu system
n: Loading (90%): Loading main menu
n: Loading (100%): Done! Starting menu
n: Lua: Registering as non-AUTH
n: running Lua startup script startup.lua
n: LUA: Hello from Lua, OpenLieroX/0.59_beta10
n: LUA: timer demo 0, cur time: 186
n: <Settings:1> Settings:Lives: update -2 -> 10
n: <Settings:1> Settings:TimeLimit: update 6 -> 0
n: <Settings:1> Settings:LevelName: update  -> Poo Arena.lxl
n: <Settings:1> Settings:ModName: update  -> C&C V1.2B
n: LUA: timer demo 1, cur time: 1186
n: LUA: timer demo 2, cur time: 2193
n: LUA: timer demo 3, cur time: 3193
n: LUA: timer demo 4, cur time: 4193
n: LUA: timer demo 5, cur time: 5194
n: LUA: Good Bye from Lua
n: Shutting me down...
n: Lua: Registering as non-AUTH
n: Everything was shut down
n: waiting for all left threads and tasks
n: Good Bye and enjoy your day...

It seems to me as though OLX started up without errors but then just exited automatically as soon as it was finished starting. Might that be a correct interpretation?


Update: This is where I switched to branch 0.58
With all the same dependencies and project file directories, compilation succeeded on the first try. I moved the resulting executable to the installation directory of OpenLieroX 0.58 rc3, [SPOILER]and it runs perfectly! :D


Concluding remarks
I am new to this whole thing so I am sure that there is stuff that I have overlooked, misinterpreted or otherwise not gotten right. Obviously. Otherwise everything would probably have compiled and ran just fine in less than two whole days of struggle.

I hope that this post gives you an insight into what kind of problems a kind of inexperienced newcomer might face today so that the information and files supplied on the Wiki and elsewhere can be updated to spare other newcomers from these problems. If you find this post relevant or useful, feel free to use it in any way you like.

Merry christmas and best wishes from Sweden!

/Martin Stålberg

EDIT: I forgot to mention that I had another compilation issue later, regarding "mt.exe". See my next post in this topic for info on this.
« Last Edit: December 27, 2012, 09:52:52 am by mast4461 »

DarkCharlie

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #96 on: December 25, 2012, 11:24:28 am »
Thanks, this is what I wanted to write for a long time. Great you managed to solve it!

albert

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #97 on: December 25, 2012, 03:51:38 pm »
It sounds like you still didn't got 0.59 to run, right?

Btw., this is also for the non-free MSVC now. So, it probably wont work for users of the free MSVC Express.

Messages such as "The application was unable to start correctly (0xc000007b)" indicate that probably something with the manifest files or the DLLs or the linking or so was messed up.

There is also an openlierox-distrib repository which contains all the used DLLs for building up the final release ZIP-file.

You are not really alone. I have big fears of setting up the build setup for OLX on a new Windows system. And every time I had to do this, it took me almost a day with many many problems, similar of what you are describing. And it's mostly trial-and-error, without really understanding why it works or why it doesn't. But that is quite usual for the Windows platform.

--

Stdin CLI support is not important. CLI = Command line interface. On Linux/Unix/Mac, you can control OLX also from the command line, you'll get a full-featured shell there (this is like the ingame-console but more powerful).

You can also ignore messages about unknown options in options.cfg. They were saved by different OLX versions.

The execution log you posted indicates no error. I don't really see from there why it exited. maybe set some breakpoints.

mast4461

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #98 on: December 27, 2012, 11:46:08 pm »
DarkCharlie: Glad you like it. :)

Albert: Still haven't got 0.59 working, but I haven't tried since I succeeded with 0.58. About the '0xc000007b' error, thank you for your feedback. This was possibly caused by my antivirus software. I have to turn off it's real time scanning while compiling 0.58 or I get an error about 'mt.exe'. Sources on the internet suggests that this has to do with the antivirus program preventing the writing of the manifest file. Disabling manifest file writing avoids that error, but the resulting executable crashes immediately. Turning off the real time scanning also avoids the error, but the resulting executable works. Perhaps the executable from 0.59 would also work if I turned off the real time antivirus scanning during compilation.

DarkCharlie

Re: [HowTo] Compiling OLX on Windows for dummies
« Reply #99 on: December 29, 2012, 06:44:45 pm »
I created a build system for Windows, now the building should be as easy as hitting F5. See the openlierox-win-build project on Github (https://github.com/karelp/openlierox-win-build).
Pages: 1 ... 3 4 [5] 6   Go Up