Compile Error

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
det
Posts: 1
Joined: Tue Apr 04, 2006 7:04 am

Compile Error

Post by det »

Hi,

i will use VC8 and winxp.

when i compile irrlicht i become a error :shock:

c:\programme\microsoft visual studio 8\vc\platformsdk\include\winnt.h (222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

i can not compile irrlicht with vc8. :?

with vc6 i have no problem. 8) (but no directx9)

can someone help me ?


sorry for my bad english :oops:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Might be an include order problem, so try to change the includes in your app. Or there are some incompatabilities with the SDKs?
yodathegreat
Posts: 9
Joined: Tue Dec 26, 2006 12:16 am

Re: Compile Error

Post by yodathegreat »

Replace by

typedef void *PVOID;
typedef void * POINTER_64 PVOID64;


best regards
Yodathegreat
det wrote:Hi,

i will use VC8 and winxp.

when i compile irrlicht i become a error :shock:

c:\programme\microsoft visual studio 8\vc\platformsdk\include\winnt.h (222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'

i can not compile irrlicht with vc8. :?

with vc6 i have no problem. 8) (but no directx9)

can someone help me ?


sorry for my bad english :oops:
Robert Y.
Posts: 212
Joined: Sun Jan 28, 2007 11:23 pm

Re: Compile Error

Post by Robert Y. »

yodathegreat wrote:Replace by

typedef void *PVOID;
typedef void * POINTER_64 PVOID64;
That isn't very helpful, as the file already contains those definitions. I have had the same problem when compiling Irrlicht 'out-of -the-box'. It is caused by defining your include and library paths. If you put the directx sdk paths before the normal VC paths, it will be missing definitions, and a c2146 error on pvoid64 will occur. To fix it, just put the dx8 include path as the last entry in your compiler options.
Panther
Posts: 34
Joined: Tue Jun 06, 2006 1:05 am

Recompiling Irrlicht and winnt.h problems

Post by Panther »

Hi,

I tried re-ordering my Includes as Robert Y. suggested, but this didn't fix the problem. I noticed though that the winnt.h reference to POINTER_64 is defined (in the same directory of the SDK) as __ptr64 in the file BaseTsd.h. Therefore, in the file winnt.h if you change this:

Code: Select all

typedef void * POINTER_64 PVOID64; 
...to this:

Code: Select all

typedef void * __ptr64 PVOID64; 
It should compile just fine.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You should _never_ need to modify a system header.

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

Post by hybrid »

Except for bugs found in them. And MSVC has been notoriously buggy in this respect.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Funny, I had no problems building and using Irrlicht with Visual Studio 8.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

hybrid wrote: Except for bugs found in them. And MSVC has been notoriously buggy in this respect.
No. There are couple of directives like #define, #ifdef, #ifndef, endif and other. So developers should use it and make compilable sources in any environment.

That is why vitek is right:
vitek wrote: You should _never_ need to modify a system header.
CuteAlien
Admin
Posts: 9732
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I did also just stumble upon that problem and Robert Y. is right.

At least with VS Express the platform SDK has to be included before DX8.
If it doesn't work it's worth checking both include path dialogs - one is in project settings, but paths can also be set in tools - options. It seems the include path set in the project settings will be searched first.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply