Author Topic: compiling on code::blocks  (Read 2952 times)

noals

  • Guest
compiling on code::blocks
« on: 13 February 2009, 01:39:04 »
hi,
im french so excuse my bad english sometime.
i would like to be able to recompile the whole game but im kinda a noob in programming so can someone make a tutorial about "how to compile glest with code::blocks" or something ?
i saw the tutorial "Using MS Visual Studio .Net 2003" on the wiki and this topic on the forum about code::blocks but i dont get it all and im lost already with all the libraries needed for glest.

i use windows xp pro and code::blocks 8.02 with mingw

1°/ what version of Xerces-c do i need ?

2°/ about "Mesa3D or XFree86 for GLU headers and libraries", what is the difference between them ?

3°/ in the wiki there is also "Programs (non-MSVS)"
i guess its for those who dont use MSVS like i would so i need to download jam, autoconf and autogen as well ?

i would like to recompile the whole game to try to change some mechanics in the game like the camera or the controls.
to tell you the truth, i dont really like RTS and the project i have in mind is more about 3rd person adventure game but seeing how glest is well made, i hope it will help me understand more about classes in C++, network communication and others stuff im interested in.

in hope you will can help me.
thx

cya.
« Last Edit: 18 June 2016, 14:25:32 by filux »

asmodeus

  • Guest
Re: compiling on code::blocks
« Reply #1 on: 14 February 2009, 10:46:30 »
Why not just use Visual Studio Express which is a zero cost download without the added hassle of mingw?

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: compiling on code::blocks
« Reply #2 on: 14 February 2009, 23:26:41 »
Possibly preference.

1/ I use xerces-c_2_8

2/ Not sure. http://www.linux.org/docs/ldp/howto/Nvidia-OpenGL-Configuration/x103.html

3/ You don't need these. Jam is a build system. Code::Blocks has it's own custom build system.

http://glest.codemonger.org/files/win32-glest-deps.rar That should have all the dependencies you need (zlib might be missing).
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

noals

  • Guest
Re: compiling on code::blocks
« Reply #3 on: 15 February 2009, 21:32:40 »
hi, thx for your answers.

Quote
Why not just use Visual Studio Express which is a zero cost download without the added hassle of mingw?
i used code::blocks to try irrlicht and it was ok so i just continu with it.
im a noob anyway so no big reason behind this choice and last time i tryed VS, the "debugger just-in-time" was kinda annoying.

Quote
Possibly preference.

1/ I use xerces-c_2_8
2/ Not sure. http://www.linux.org/docs/ldp/howto/Nvidia-OpenGL-Configuration/x103.html
3/ You don't need these. Jam is a build system. Code::Blocks has it's own custom build system.

http://glest.codemonger.org/files/win32-glest-deps.rar That should have all the dependencies you need (zlib might be missing).
thx, i will try asap.

cya.

noals

  • Guest
Re: compiling on code::blocks
« Reply #4 on: 18 February 2009, 04:19:54 »
hi,

i tryed few times with the files i downloaded or with the pack from Hailstone but i ended up with 3 differents errors.
-one with some files from xercesc missing but of course i have them (kind of linkage error i think)
-another that was the same as in Hailstone's post but the time i notice it was the same, my project was deleted for others tries and i wasnt able to have the same error again... ^^:
-and the last one was about gcc compiler, i needed to define something for the compiler but i didnt really understand it.

if i got it well, i first need to compile the static library to then compile the game with it.

> i create a new project "static library" in code::blocks called "myGlestLib"
> i choose the GNU GCC compiler
> my new project is created, i delete the default "main.c" from it
> i add the 4 folder "bin, include, lib, src" in my project directory
> in code::blocks, i "Add files recursively" then i choose "include, lib and src"
> in c::b's Build options/Linker settings, i add the files in the "bin" directory
> in c::b's Build options/Search directories/Compiler, i add my "include" directory and the 3 directories in "include/..."
> in c::b's Build options/Search directories/Linker, i add my "lib" directory
> then i try to compile :

the build message is kinda too long but it point me to an error message in the code
Code: [Select]
    #error Code requires port to current development environment
#endif

// ---------------------------------------------------------------------------
//  The gcc compiler 2.95... is generating an internal error for some template
//  definitions. So, if we are compiling with gcc, have a specific define that
//  we can later use in the code.
// ---------------------------------------------------------------------------
#if defined(__GNUC__)
#define XML_GCC_VERSION (__GNUC__ * 10000 \
                         + __GNUC_MINOR__ * 100 \
                         + __GNUC_PATCHLEVEL__)
#endif

do i need to use the compiler from the MStoolkit2003 ? i should have it somewhere because of irrlicht
do i miss something or is there something i do wrong ?

thx
cya

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: compiling on code::blocks
« Reply #5 on: 18 February 2009, 05:14:36 »
Quote
if i got it well, i first need to compile the static library to then compile the game with it.
That's right.

You only need to recursively add 'include' and 'src' to the project.
In c::b's Build options/Linker settings, you should add the files in 'lib' directory (d at end of file means it is debug version and static is statically linked, only include one of each, eg only ogg_d.lib not the others)
In c::b's Build options/Search directories/Compiler, you also need to include subdirs like shared_lib/include/platform/win32 (not sdl though because there are files named the same and will conflict)

I'm not sure what the error message is.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

asmodeus

  • Guest
Re: compiling on code::blocks
« Reply #6 on: 18 February 2009, 14:48:28 »
Possibly preference.

See, I'm thinking less about the license and features of the IDE and more about the compiler.  Mingw's compiler is terrible at optimizing on Windows, when they work the bugs out of gcc 4.x that might not be the case but gcc 3.x (the current stable release) is terrible on Windows.

noals

  • Guest
Re: compiling on code::blocks
« Reply #7 on: 18 February 2009, 19:46:17 »
hi,

i think i will try to reinstall the compiler from the microsoft toolkit 2003 in c::b and try again.
i did others tries with GCC but its kinda always the same result.

thx for help.
cya

noals

  • Guest
Re: compiling on code::blocks
« Reply #8 on: 18 February 2009, 21:57:55 »
hi,

compiling with MVC-toolkit2003 now, i end up with missing files again like :
Quote
xerces-c_2_8_0-x86-windows-vc_7_1\include\xercesc\util\Compilers\VCPPDefs.hpp|28|fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|
through this one, im not sure i have it.

Hailstone said that zlib might be missing in his pack.
do i really need it ? how do i add it ?

is it possible that someone write a complete little tuto about the requierement to compile the library ?
what files do i really need ?
what do i really put in my project ?
is there an order ? why 2 glprocs.c ?
what in c::b's Build options/Linker settings ?
what in c::b's Build options/Search directories/Compiler ?
what in c::b's Build options/Search directories/Linker ?

i try and try but it still dont compile so i should have miss something i guess through i tryed with the Hailstone's pack, the one from the glest_source, the 2 at the same time, tryed to make my own pack as well, tryed to follow the wiki tuto, used GCC, Toolkit2003, linking stuff all the way...

thx
cya