Author Topic: Compiling on Windows with VC++ 7.1  (Read 52479 times)

Devoid

  • Guest
Compiling on Windows with VC++ 7.1
« on: 26 January 2005, 06:07:45 »
Hi all!  Glad to see the source code made the light of day! :D  After downloading the code, I had a quick go and compiling it under Visual Studio .Net 2003 with VC++ 7.1.  Looks like there are various libraries needed (Xerces, OpenGL of some sort + others).  Does anybody have any information on compiling this under Visual Studio and what libraries I might need (and where to get them)?  Or even better, a solution/projects files?

Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #1 on: 26 January 2005, 19:42:17 »
Hi, I've posted info about the libraries used by Glest in this thead: http://www.glest.org/phpBB2/viewtopic.php?t=480
« Last Edit: 1 January 1970, 00:00:00 by martiño »

Devoid

  • Guest
Yeah - It finally compiles...!
« Reply #2 on: 31 January 2005, 03:19:19 »
Hey - Thanks for the info on how to get it to compile.  

It took a me a while to work out where the extra libraries and include files should go, but it now compiles fine, and after copying the newly compiled .exe (and Xerces-c_2_6.dll) over to the Glest 1.0.9 folder it even works when I run it! :D

If anyone is interested, I will put up more detailed steps on how to get it to compile (i.e. a step-by-step guide on setting up VC++7, what libraries to download, where to unpack them, what include files you need, what library paths should be set, etc).

Let the modding begin!

Thanks again M for the info,
Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

jasonlai1975

  • Guest
(No subject)
« Reply #3 on: 31 January 2005, 16:29:44 »
Hi Devoid,
That would be great,i m looking forward for your step by step guide.I m attempting to compile glest code.
Thanks again
« Last Edit: 1 January 1970, 00:00:00 by jasonlai1975 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #4 on: 31 January 2005, 20:04:16 »
I'm glad you finally did it.  :)
« Last Edit: 1 January 1970, 00:00:00 by martiño »

jasonlai1975

  • Guest
Can someone provide me with list of libraries to link glest
« Reply #5 on: 4 February 2005, 13:59:42 »
I m have just build the shared library code  but not able to  create the glest exe because link error : lnk 2001 and lnk 2019.I still need complete  list of libraries required to compile glest.
Thank you.
« Last Edit: 1 January 1970, 00:00:00 by jasonlai1975 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #6 on: 4 February 2005, 18:29:46 »
The completed list is the one of the link above. If you paste all the string of the message maybe I can help you.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

jasonlai1975

  • Guest
Finally manage to compile and run glest
« Reply #7 on: 4 February 2005, 18:56:21 »
After few hours struggling with the missing libraries,i finally managing to link all those libraries in VC7  and run the newly compiled glest exe successfully.
A good learning experience for me .Thanks for your offer ,martino.
The missing libraries are dsound.lib,and dxguid.lib and opengl sdk(gl.h,glu.h,glprocs.h,glprocs.c)  need to be compiled as a static library first ,then link it with the main code. Happy coding !
« Last Edit: 1 January 1970, 00:00:00 by jasonlai1975 »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #8 on: 4 February 2005, 21:01:42 »
Oh I forgot about direct sound, thanx for the info.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

Devoid

  • Guest
Glest Build Instructions
« Reply #9 on: 7 February 2005, 07:50:05 »
Guys,

Sorry about the delay in getting back to this, have been flat out at work.  Will finish off the instructions in the next few days and post them here.  Stay tuned...

Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

Devoid

  • Guest
Build Instructions for Visual Studio .Net 2003 C++ 7.1
« Reply #10 on: 21 February 2005, 05:19:18 »
Glest Build Documentation for Visual Studio .Net 2003
Author: David Lendrum
Email: devoidREMOVEME@REMOVEMEbigpond.net.au

This guide was written on February 21st, 2005.  File locations/versions may have changed since this was written.  I will attempt to keep the information here as current as possible.

If you have any questions, or find any errors with the instructions, email me and I will fix them up.  I will also post a list of 'common problems' and solutions (assuming people have problems) in the near future based on information people have sent me.

NOTE: This is not how I would set up the development project with regard to locations and directory structure, but it was the simplest to get working.  Feel free once you have got everything working to play around and re-organise stuff.

Requirements:
This guide was written for the following environment:
- Windows XP Professional SP2
- Microsoft Visual Studio.Net 2003 Enterprise Edition
- WinZip (or other unpacking tool)

Step 1 - Make sure your machine can run Glest!
Ok - Before trying to compile anything, make sure your machine can actually run Glest.  This should not be a problem for most Windows based machines around today.  You will need to download the Glest binaries from SourceForge and install them.  These files are available in the Glest project area, at this link:

https://sourceforge.net/project/showfiles.php?group_id=127297

You want to download the 'glest win32' package (currently 1.0.9 and is about 39MB in size).  Once you have it downloaded, unpack and install it.  This is the complete game with binaries, graphics and sound resources.  Once the game has been installed, run it to make sure it works ok.  Notice on the startup screen the version number is v1.0.9. Don't skip this step! Once we compile our own .EXE we will copy it into this folder and run it, so you need all of the Glest resources in their correct places in order for it to work.

Step 2 - Unpacking the Glest Source
Ok, that was the easy bit. ;)
« Last Edit: 15 April 2016, 20:25:59 by filux »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #11 on: 26 February 2005, 22:15:49 »
Thanx a lot for the guide. As you can see I've stickyed the post so it's always easy to find for the people visiting the forum.

I'd just like to add that if you want to disable those annoying warnings, you can add the following line to the "command line options" in the VC project:

/wd 4018 /wd 4267 /wd 4250

4018/4267 : signed/unsigned mismatch: Warnings that appear when you try to compare or assign a signed and unsigned integers. These warnings are quite stupid since there is no problem in doing that when the numbers are below half of the precision of the type. I systematically ignore them.

4250: "this" used in base member initializer list": Glest uses "this" to initialize "attributes" not "base members", this seems to be a bug in VC.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

Froztwolf

  • Guest
Cudos
« Reply #12 on: 4 March 2005, 17:06:00 »
Excellent guide. Actually managed to to build the game in first try.
Thank you very much Devoid :)
« Last Edit: 1 January 1970, 00:00:00 by Froztwolf »

Devoid

  • Guest
Thanks
« Reply #13 on: 4 March 2005, 22:29:37 »
Hi Froztwolf, Thanks for the feedback.  Glad to know the Guide was useful to someone.  The reason it took me so long to finish it, was after I had written it, I formatted my machine and re-installed it so I could follow my own guide to make sure everything worked and I hadn't missed anything.  Good luck with the game.

Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

Devoid

  • Guest
Visual Studio 2005 Beta C++ Compile Error
« Reply #14 on: 12 March 2005, 00:26:39 »
Hi Guest,

I haven't tired to compile on Visual Studio .Net 2005, although I do have the December Technoolgy Preview version.  I will install that and have a go, but from the sound of it there might be some minor changes to the code required to build under VC++ 8.0 or else the source code you have might be corrupt (unlikely).

Will post my results once I have installed the latest Visual Studio Beta.

Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #15 on: 26 March 2005, 13:21:57 »
Quote
In my professional opinion shouldn't one use a rounding function?


All that's needed here is a static_cast<int>(X).
« Last Edit: 1 January 1970, 00:00:00 by martiño »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #16 on: 7 May 2005, 01:41:13 »
Yes, I always disable this type of warnings.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #17 on: 14 June 2005, 22:22:33 »
light.h is not needed, its included from light.cpp, but you can simply remove light.cpp

glu.h is included in the GLsdk
« Last Edit: 1 January 1970, 00:00:00 by martiño »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #18 on: 14 June 2005, 22:42:29 »
Yes it should be ok using the glu.h in windows as far as Glest doesn't use any GLU extensions.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #19 on: 15 June 2005, 18:14:24 »
I dont know what the problem is, but you are using a quite old version, try downloading the latest one from sourceforge CVS.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

Devoid

  • Guest
Error in Linking
« Reply #20 on: 8 August 2005, 13:45:37 »
Hi Odin_KG,

Looks like it is a linking error (duh!) which is more than likely a problem with the setup of the paths in VC++.  Double check that you have followed all the steps in the order they are in the document - especially the setting up and order of the paths.  If possible, try and build it on another machine.

I haven't had a chance to build the 1.1.1 version yet due to a new job and travel overseas, but will try and get to it soon.

I will also attempt to update the guide once I have got 1.1.1 compiling and will put together a 'FAQ' section with the common problems that have come up in this forum topic.

Sorry I couldn't be more help.

Cheers,
Devoid
« Last Edit: 1 January 1970, 00:00:00 by Devoid »

vikingswarchief

  • Guest
Compilation probleme with source 1.2.1.2
« Reply #21 on: 15 February 2006, 09:39:23 »
hi all,

i(ve tried to compile glest version 1.2.1.2 with visual studio .Net 2003, I compiled GlestLib with no error (47 warnings) but when I try to compile GlestSrc I have some links error that I can not resolve :

Generating Code...
Linking...
LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
renderer.obj : error LNK2019: unresolved external symbol __imp__glDisable@4 referenced in function "public: virtual void __thiscall Glest::Game::MeshCallbackTeamColor::execute(class Shared::Graphics::Mesh const *)" (?execute@MeshCallbackTeamColor@Game@Glest@@UAEXPBVMesh@Graphics@Shared@@@Z)
GlestLib.lib(model_renderer_gl.obj) : error LNK2001: unresolved external symbol __imp__glDisable@4
GlestLib.lib(particle_renderer_gl.obj) : error LNK2001: unresolved external symbol __imp__glDisable@4
renderer.obj : error LNK2019: unresolved external symbol __imp__glBindTexture@8 referenced in function "public: virtual void __thiscall Glest::Game::MeshCallbackTeamColor::execute(class Shared::Graphics::Mesh const *)" (?execute@MeshCallbackTeamColor@Game@Glest@@UAEXPBVMesh@Graphics@Shared@@@Z)
GlestLib.lib(model_renderer_gl.obj) : error LNK2001: unresolved external symbol __imp__glBindTexture@8
GlestLib.lib(particle_renderer_gl.obj) : error LNK2001: unresolved external symbol __imp__glBindTexture@8


like that for exemple (186 errors in total)

can any one help me please ?

thanks all
bye
« Last Edit: 1 January 1970, 00:00:00 by vikingswarchief »

zhuaple

  • Guest
(No subject)
« Reply #22 on: 19 February 2006, 16:24:41 »
Hello!
I have the following error:

GlestSrc error LNK2019: unresolved external symbol "public: __thiscall Shared::Sound::Ds8::SoundPlayerDs8::SoundPlayerDs8(void)" (??0SoundPlayerDs8@Ds8@Sound@Shared@@QAE@XZ) referenced in function "public: virtual class Shared::Sound::SoundPlayer * __thiscall Shared::Sound::Ds8::SoundFactoryDs8::newSoundPlayer(void)" (?newSoundPlayer@SoundFactoryDs8@Ds8@Sound@Shared@@UAEPAVSoundPlayer@34@XZ)

What am i  doing wrong?

It's the only one eror i got :(
« Last Edit: 1 January 1970, 00:00:00 by zhuaple »

zhuaple

  • Guest
(No subject)
« Reply #23 on: 19 February 2006, 19:17:44 »
PLEASE HELP, i stuck at this damn link error :(:(:(:(:(
« Last Edit: 1 January 1970, 00:00:00 by zhuaple »

fireborn

  • Guest
(No subject)
« Reply #24 on: 19 February 2006, 19:25:04 »
try disabling sound in glest...
« Last Edit: 1 January 1970, 00:00:00 by fireborn »