Page 1 of 1

Can´t Compile last git version ...

Posted: 16 May 2010, 18:19
by strikerbcb
hello, i´m trying but can´t compile the last version of tmw ( client and server ) in git, but it give me errors with mingw, its necessary other version of mingw than with comes with Codeblocks ?

Error log :
-------------- Build: Windows in Mana Client ---------------

Compiling: src\actor.cpp
Compiling: src\actorsprite.cpp
Compiling: src\animatedsprite.cpp
Compiling: src\animationparticle.cpp
Compiling: src\avatar.cpp
Compiling: src\being.cpp
E:\tmp\mana-mana\src\being.cpp: In member function `void Being::setDestination(int, int)':
E:\tmp\mana-mana\src\being.cpp:141: warning: passing `float' for converting 1 of `Path Map::findPixelPath(int, int, int, int, int, unsigned char, int)'
E:\tmp\mana-mana\src\being.cpp:141: warning: passing `float' for converting 2 of `Path Map::findPixelPath(int, int, int, int, int, unsigned char, int)'
Compiling: src\beingmanager.cpp
Compiling: src\channel.cpp
Compiling: src\channelmanager.cpp
Compiling: src\chatlog.cpp
Compiling: src\client.cpp
In file included from C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/ole2.h:29,
from C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/shlobj.h:11,
from E:\tmp\mana-mana\src\utils/specialfolder.h:25,
from E:\tmp\mana-mana\src\client.cpp:89:
C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/oleidl.h:210: error: `LPLOGPALETTE' has not been declared
C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/oleidl.h:453: error: `LPLOGPALETTE' has not been declared
C:/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/oleidl.h:481: error: `LPLOGPALETTE' has not been declared
Process terminated with status 1 (0 minutes, 15 seconds)
3 errors, 2 warnings
Details :
Windows 7 64 Bits
Codeblocks + Mingw
Latest Tmw Client and Server from Git

Thanks.

Re: Can´t Compile last git version ...

Posted: 16 May 2010, 19:07
by Crush
The problem occurs during the compilation of a file which belongs to mingw itself, not the mana client. This hints on a problem with your mingw install.

Re: Can´t Compile last git version ...

Posted: 16 May 2010, 19:29
by Jaxad0127
Are you using the latest C::B? Do try the latest nightly of it.

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 05:48
by Crush
The stable version of C::B works for me, though (also Win7 64). I am using a separate mingw install though.

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 07:04
by iceslice
It's like drinking water to compile in linux. But to compile in windows you got to drink some stones.

I had many such errors initially. But sorry atm I dont remember how I got them all solved.

And this problem belongs to MingW ofcourse & not with mana.

Edit: I used MingW that came with C.B. You may try a separate MingW

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 12:44
by Jaxad0127
Crush wrote:The stable version of C::B works for me, though (also Win7 64). I am using a separate mingw install though.
The nightlies should have newer mingws.

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 15:05
by iceslice
open the file C:\Program Files\CodeBlocks\MinGW\include\oleidl.h

there are some typedef declarations. add the following line along...

typedef _COM_interface ILogPalette *LPLOGPALETTE;

it'll work :)

but other errors waiting ahead for you :D

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 16:18
by strikerbcb
well, i'm using the mingw with comes with default Codeblocks instalation, it works from compile many versions of mana client and servers, but since two months ago it don't work anymore. It's not a problem from mingw, because i can compile other things, like Ogre 3D applications for example.

I will try to download a latest mingw installation and make it my default compiler and test ...

Re: Can´t Compile last git version ...

Posted: 17 May 2010, 18:28
by Jaxad0127
Can you find the commit that broke it?

Re: Can´t Compile last git version ...

Posted: 08 Jul 2010, 01:55
by Acegi
Did you find a solution to this strikerbcb?

Re: Can´t Compile last git version ...

Posted: 12 Jul 2010, 14:32
by Kage
iceslice wrote:open the file C:\Program Files\CodeBlocks\MinGW\include\oleidl.h

there are some typedef declarations. add the following line along...

typedef _COM_interface ILogPalette *LPLOGPALETTE;

it'll work :)

but other errors waiting ahead for you :D

This worked for me, but this is by no means a ideal solution to the problem. It seems the problem might be with SDL.

Also, now I get a linker error

Code: Select all

lib/libSDL_gfx.a(SDL_gfxBlitFunc.o):SDL_gfxBlitFunc.c:(.data+0x0): multiple definition of `GFX_ALPHA_ADJUST'
.objs\src\graphics.o:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_deque.h:(.data+0x0): first defined here
Crush: I would try updating the SDL version in your build package if its not the latest.

Re: Can´t Compile last git version ...

Posted: 12 Jul 2010, 18:17
by Jaxad0127
Kage wrote:
iceslice wrote:open the file C:\Program Files\CodeBlocks\MinGW\include\oleidl.h

there are some typedef declarations. add the following line along...

typedef _COM_interface ILogPalette *LPLOGPALETTE;

it'll work :)

but other errors waiting ahead for you :D

This worked for me, but this is by no means a ideal solution to the problem. It seems the problem might be with SDL.

Also, now I get a linker error

Code: Select all

lib/libSDL_gfx.a(SDL_gfxBlitFunc.o):SDL_gfxBlitFunc.c:(.data+0x0): multiple definition of `GFX_ALPHA_ADJUST'
.objs\src\graphics.o:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_deque.h:(.data+0x0): first defined here
Crush: I would try updating the SDL version in your build package if its not the latest.
He's on vacation for three weeks....

Re: Can´t Compile last git version ...

Posted: 07 May 2011, 07:32
by Idiomatic
Forgive the grave digging, hopefully this could be useful to other people that run into the same problem (like i did)

I also got the linker error:

Code: Select all

lib/libSDL_gfx.a(SDL_gfxBlitFunc.o):SDL_gfxBlitFunc.c:(.data+0x0): multiple definition of `GFX_ALPHA_ADJUST'
.objs\src\graphics.o:C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_deque.h:(.data+0x0): first defined here
And added '-Wl,--allow-multiple-definition' to the linker settings which seems to have worked. Use at your own risk though, I guarantee this isn't the correct solution.

Edit:

The correct solution is that you most likely downloaded an outdated library pack. Updated ones are put here. Thanks Crush. (Still, it is probably better to actually download all the libraries yourself since it isn't Crush's job to worry about our libraries. re: http://doc.manasource.org/dependencies )