user3049681
user3049681

Reputation: 407

path correct but include not found

OS: win7, gcc++ I have set:

AWE_DIR=C:\Program Files (x86)\Awesomium Technologies LLC\Awesomium SDK\1.7.3.0\

and it's been displayed like this when I call "SET". But when I try to compile my code

 #include <C:\Program Files (x86)\Awesomium Technologies LLC\Awesomium SDK\1.7.3.0\include\Awesomium\WebCore.h>

is working, but:

 #include <$(AWE_DIR)include\Awesomium\WebCore.h>

is not working. (include\Awesomium\WebCore.h: No such file or directory)

Whats am I doing wrong? thanks!

Upvotes: 0

Views: 277

Answers (2)

stijn
stijn

Reputation: 35901

AWE_DIR is an environment variable. Your compiler doesn't know anything about environment variables when looking for include files. It shouldn't.

Instead you can add C:\Program Files (x86)\Awesomium Technologies LLC\Awesomium SDK\1.7.3.0\include to the include path in the compiler options (using -I) and then use

#include <Awesomium\WebCore.h>

(without the ugly leading include btw). Surely this should be described in the Awesomium docs?

edit quickly checked the docs and there is not much on using Awesomium with gcc, only with VS. Also you can just use $(AWE_DIR)\include or %AWE_DIR%\include etc with -I since when invoking gcc you're in some kind of command line environment which does know environment variables and does expand them.

Upvotes: 1

πάντα ῥεῖ
πάντα ῥεῖ

Reputation: 1

The c++ preprocessor doesn't expand shell variables! Try using the -I option, and omit the path.

Upvotes: 0

Related Questions