06-22-2010 03:29 PM
Hello
I am developing an application with ni-can library using Visual c++ 2005. I have included "nican.h" and been able to build a successful project. However, when I tried to include "windows.h" in order to call Sleep() function, the compiler gave me a long list of errors; like missing ; , conflict names, etc -- after just adding #include <windows.h> before #include "nican.h".
I am wondering if it has something to do with the project setting? I have created my project as a win32-console (empty) project and set path to nican include and lib directories. Do I need to set anything else?
I would appreciate your comments/suggestions 🙂
Thank you.
Lek
06-23-2010 05:50 PM
Lek,
Are you able to include both of these header files in a new empty project and compile it without errors? Also, can you create a new project that just includes the windows.h file, and will that compile by itself? Also, does it make any difference in your code if you put the windows.h include statement before or after the nican.h one?
-Christina
06-23-2010 06:13 PM
Christina,
Thank you for your reply.
#include <windows.h> works fine by itself. Either including <windows.h> before or after nican.h gives me complilation error.I have not worked with windows.h -- Do I need to set anything in my VC-2005 project setting?
Thank you,
Lek
07-14-2010 11:21 AM
It works fine on my computer with both include statements. Do you have any other computers that you could try this on to see if it is specific to that computer?
-Christina