About Store Forum Documentation Contact



Post Reply 
Compiler Errors
Author Message
Brainache Offline
Member

Post: #1
Compiler Errors
Hey there,

If you remember.. I am doing some work with using esenthel's code in a non graphic environment for a content creation tool for our project..

After switching to the latest version of the esenthel engine, I am now getting compiler errors when including windows.h and stdio.h

The errors are coming from the Microsoft SDK file winnt.h

"1>c:\program files\microsoft sdks\windows\v6.0a\include\winnt.h(963) : error C2143: syntax error : missing ')' before 'this'"

points to this line: template <typename T, size_t N>

Any suggestions?

Thanks
04-14-2009 08:56 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
Re: Compiler Errors
the engine uses 'T' defined as (*this)

do you have all your OS/3rd party lib headers _before_ including the esenthelengine.h header? (like in the documentation about it)
04-14-2009 09:32 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #3
Re: Compiler Errors
Esenthel Engine by default removes access to standard headers (for example "windows.h"), this benefits in:

faster compile time
clean global namespace
However if you need access to standard headers, you should include them in this way:

Edit your precompiled header file, typically "stdafx.h" to look like this

// Include Standard Headers
#define NOMINMAX
#include <windows.h>

// Include 3rd Party Libraries which use Standard Headers
..

// Include Esenthel Engine
#include <EsenthelEngine/EsenthelEngine.h>

// Include your Custom Headers
..
04-14-2009 09:33 PM
Find all posts by this user Quote this message in a reply
Brainache Offline
Member

Post: #4
Re: Compiler Errors
Yep. that did it... thankya kindly.
04-14-2009 09:52 PM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #5
RE: Compiler Errors
I'm sorry to bring this thread back from the dead, but it doesn't work.
I really have to use windows.h and if I use it as suggested in the documentation and your reply above, I am still getting tons of EE related include problems.

Just a few examples:
Code:
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(102) : error C2226: syntax error : unexpected type 'TYPE0'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(102) : error C2143: syntax error : missing ')' before '&'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(102) : error C2143: syntax error : missing ';' before '&'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(102) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(102) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(103) : error C2226: syntax error : unexpected type 'TYPE0'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(103) : error C2988: unrecognizable template declaration/definition
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(103) : error C2059: syntax error : '<cv-qualifer>'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(103) : error C2059: syntax error : ')'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(233) : error C2989: 'EE::Vec2' : class template has already been declared as a non-class template
3>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\_\structs.h(7) : see declaration of 'EE::Vec2'
3>c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\math\vector.h(313) : error C2989: 'EE::VecD2' : class template has already been declared as a non-class template
3>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\esenthelengine\_\structs.h(8) : see declaration of 'EE::VecD2'
06-20-2010 06:10 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Compiler Errors
I've just tested it, and stdafx.h of following form compiles successfully

Code:
/******************************************************************************/
#define NOMINMAX
#include <windows.h>
#include <EsenthelEngine/EsenthelEngine.h>
/******************************************************************************/
06-20-2010 06:35 PM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #7
RE: Compiler Errors
That test is not really a test because you don't include anything after windows.h. wink
I guess I have to check all the includes inbetween then. There are many, including raknet.
Ok, I think I found the bad boy. All these errors seem to have been caused by these cute lines:

Code:
#ifndef MIN
#define MIN(x,y)  ((x)>(y)?(y):(x))
#endif
#ifndef MAX
#define MAX(x,y)  ((x)>(y)?(x):(y))
#endif

lol
(This post was last modified: 06-20-2010 07:07 PM by MrPi.)
06-20-2010 06:48 PM
Find all posts by this user Quote this message in a reply
Post Reply