views:

151

answers:

1

Hi all, this may sound too simple, but I'm missing something. I need to write a RAPI Windows Console app using C++. I'm currently using VS2005. I've created a brand new empty Windows Consol app "MyTestRAPI" from documentation, I know I need the include of the "RAPI.H" file. So, I've tried as

#include <rapi.h>

and also by

#include "rapi.h"

I compile and get the following

fatal error C1083: Cannot open include file: 'rapi.h': No such file or directory

So, I then go to menu for "Project", "Properties". On the treeview for "Common Properties" -> "References", I go to the lower right and click on "Add Path", and include the explicit path where the rapi.h file and other .h files are located... in this case

"C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc"

which include 14 .h files

Save / build the project, and still compile error...

So, I change the #include to

#include "C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Activesync\Inc\rapi.h"

This time, it finds THIS include, but fails on finding the #includes within the rapi.h which also reside in the same folder.

What is it that I'm missing that appears to elude me.

Thanks

+1  A: 

The "Common Properties" -> "References" field refers to .NET assembly references.

To add a path to the C++ #include search path, you need to use "Configuration Properties" -> "C/C++" -> "General" -> "Additional Include Directories".

Joe Gauterin
I thought it was something stupid-simple, just drawing mental blank
DRapp