Problem Compiling Toga 1.5 Beta 5c with wvDev-C++

Discussion of chess software programming and technical issues.

Moderator: Ras

Michael Neish
Posts: 70
Joined: Wed Apr 05, 2006 9:22 am

Problem Compiling Toga 1.5 Beta 5c with wvDev-C++

Post by Michael Neish »

Hi,

The subject summarises it! Does anyone know what's wrong, and how I could fix it?

wxDev-C++ uses GCC, of course. When I try to compile Toga, it chokes in Probe.cpp, giving me (among others) the following errors.

[warning] "LoadLibrary" redefined

G:\Computer Chess\Toga1.4beta5c\src\probe.cpp In function `int LoadEgbbLibrary(char*, uint32)':

52 G:\Computer Chess\Toga1.4beta5c\src\probe.cpp invalid conversion from `void*' to `HINSTANCE__*'

53 G:\Computer Chess\Toga1.4beta5c\src\probe.cpp `RTLD_LAZY' was not declared in this scope

Double-clicking on some of the errors just takes me to winbase.h.

I read somewhere that that some of the header files in wxDev-C++ may be out of date. I wonder if this has something to do with it.

If anyone could help, I would much appreciate it.

If wxDev-C++ is no good, could someone recommend another compiler with a good performance?

Thank you very much.

Regards,

Michael Neish.
User avatar
Jim Ablett
Posts: 2285
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Problem Compiling Toga 1.5 Beta 5c with wvDev-C++

Post by Jim Ablett »

Michael Neish wrote:Hi,

The subject summarises it! Does anyone know what's wrong, and how I could fix it?

wxDev-C++ uses GCC, of course. When I try to compile Toga, it chokes in Probe.cpp, giving me (among others) the following errors.

[warning] "LoadLibrary" redefined

G:\Computer Chess\Toga1.4beta5c\src\probe.cpp In function `int LoadEgbbLibrary(char*, uint32)':

52 G:\Computer Chess\Toga1.4beta5c\src\probe.cpp invalid conversion from `void*' to `HINSTANCE__*'

53 G:\Computer Chess\Toga1.4beta5c\src\probe.cpp `RTLD_LAZY' was not declared in this scope

Double-clicking on some of the errors just takes me to winbase.h.

I read somewhere that that some of the header files in wxDev-C++ may be out of date. I wonder if this has something to do with it.

If anyone could help, I would much appreciate it.

If wxDev-C++ is no good, could someone recommend another compiler with a good performance?

Thank you very much.

Regards,

Michael Neish.
Hi Michael,

1. Add compiler macro -D_MSC_VER
2. In 'util.h' remove all MSC_VER macros (microsoft compiler references) e.g >

Code: Select all

//#ifdef _MSC_VER
//#  define S64_FORMAT "%I64d"
//#  define U64_FORMAT "%016I64X"
//#else

#  define S64_FORMAT "%lld"
#  define U64_FORMAT "%016llX"


//#endif
Jim.
Michael Neish
Posts: 70
Joined: Wed Apr 05, 2006 9:22 am

Re: Problem Compiling Toga 1.5 Beta 5c with wvDev-C++

Post by Michael Neish »

Egads, Jim, that cleared it up like a miracle!

I wouldn't have got that in a million years.

Thank you so much for your help.

Best regards,

Mike.