Jump to content
DigitalHax

Include engine.h problem

Recommended Posts

Hello. I am fairly new to the leadwerks engine. And upon my setup of a C++ project, on the first build it came up with the error,

 

"MyProject.cpp(2): fatal error C1083: Cannot open include file: 'engine.h': No such file or directory"

 

I did notice a few things different when i was setting up the project properties, extra parameters, etc, but i dismissed them because i am running 2010 version. I am sure i did everything right. Can someone help me solve this bug?

Share this post


Link to post

You will need to ensure either engine.h resides in your project root directory or your copy of 2010 includes this directory as part of its list of directories of include files. The include file is found under the CPP directory of the Leadwerks SDK. Setting a project up using the LEBuilder tool included in the SDK should prompt you for all the information you need to get an example LE project up and running.

Share this post


Link to post

It's a very bad practice to copy C++ include files anywhere. The compiler won't find them anyway, because you need to specify the correct include directories in the compiler and/or project anyway, so just do that right and leave the files where they belong.

Share this post


Link to post

Metatron is right in as much that it is generally bad practice to copy the includes from their original directories and it is better to point the compiler to those, however he is factually incorrect to state that the compiler wouldn't find them as the preprocessor does indeed check the current directory. (The only exception to this I know of is in VS 2010 where if you use the angle bracket syntax as opposed to the quoted include syntax the current directory is omitted). Like all things in life there are sometimes situations where you might want a seperate copy of library files rather than pointing to a common repository which may be subject to unverified updates during your development cycle.

Share this post


Link to post

Thanks i got it working finally :( It was having trouble accesing the leadwerks sdk CPP folder, but i copied the mathlib header and engine header now it is fine. Thanks again.

Share this post


Link to post

Does the demo now come with the headers? Dang, it's been a long time since I downloaded it.

Yes.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...