WIN64 versus _WIN64 define in Irrlicht?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
erwincoumans
Posts: 46
Joined: Tue Oct 02, 2007 6:46 am
Contact:

WIN64 versus _WIN64 define in Irrlicht?

Post by erwincoumans »

I tried compile Irrlicht for 64bit MSVC build (x64), and it didn't work using my cmake build system, because WIN64 isn't defined.

_WIN64 should be always defined by the Microsoft Visual Studio compiler when doing a 64bit build, so I wonder if it is possible to add _WIN64 to the conditional test?

#if defined (WIN64) || defined (_WIN64)
...

Thanks,
Erwin
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

Just define WIN64

Put it in your preprocessor directives.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Where is it missing? It's already fixed in IrrCompileConfig.h, all other files should only check other self-defined flags.
erwincoumans
Posts: 46
Joined: Tue Oct 02, 2007 6:46 am
Contact:

Post by erwincoumans »

It might not be missing in the default build, but I'm using my own build system using cmake.

Of course I can manually add WIN64 everywhere I need it, but what is the problem of adding _WIN64? It is a compiler built-in definition.

Cheers,
Erwin
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The test *does* test for _WIN64 as well as for WIN64. So your request is a no-op. I don't know if this wasn't fixed for the latest 1.6 SDK, but it will definitely be fixed for 1.7. So everything's fine, unless there's more than one place where this conditional is found.
erwincoumans
Posts: 46
Joined: Tue Oct 02, 2007 6:46 am
Contact:

Post by erwincoumans »

It might be fixed in CIrrCompileConfig.h, but the issue is somewhere else.

There is only a test for WIN64 around line 617 and 627 in CIrrDeviceWin32.cpp:
http://irrlicht.svn.sourceforge.net/vie ... iew=markup

I manually made it

Code: Select all

#if defined(_WIN64) || defined(WIN64)
Can this be fixed?
Cheers,
Erwin
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

Just on this point.

From memory I previously had the same problem with DEBUG.
It only had _DEBUG... or the other way around.

I had to put it into my pre-processor for the project.
That was v1.5. Not sure now.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, those were the places I was wondering about. I've fixed the win32 device and also added it to irrTypes. Should have all occasions fixed now.
@Ulf: Don't know what you're talking about, I've found no such place in either 1.5 or 1.6.
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

Hmm. Just tested it with 1.6. I took out my preprocessor definition _DEBUG leaving DEBUG.

It still works.

I remember having to put _DEBUG in before.. I think.. I'm sure.. I'm going insane!

Ok, I don't know what I did wrong before.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
Post Reply