VS2008 Professional

Forgive me if this has been answered elsewhere, I hope I didn’t miss it. I’m trying to build openFrameworks in VS2008 as a static library project. I don’t see a .sln for the library itself, so I have been rolling my own. I’m down to a single compiler error:

fatal error C1083: Cannot open include file: ‘unistd.h’: No such file or directory

I’ve google’d the file and it seems as though this would be a Linux or Mac include, but perhaps not used/needed under Windows?

I’d be glad to share my .sln/.vcproj when I get it working, and I can easily enough back-port the VS2008 versions to VS2003 Pro and VS2005 Pro.

Thanks for any help!

can you find out where that is included and try commenting it out?

The file with the include is ofUCUtils.h:

 1 #ifndef OFUCUTILS_H_  
 2 #define OFUCUTILS_H_  
 3 #include <stdio.h>  
 4 #include <stdlib.h>  
 5 #include <unistd.h>  
 6 #include <unicap.h>  
 7 #include <unistd.h>  
 8 #include <string.h>  
10 struct AVPicture;  

I added all the existing files from the libs\openFrameworks to my new .vcproj, so ofUCUtils.cpp (and of course) ofUCUtils.h were getting compiled, and causing the problem I posted about. I converted the moviePlayerExample solution to a VS2008 Pro .sln from it’s VS2005 EE format to see if I could get an idea of what was wrong. I noticed that ofUCUtils.cpp/.h isn’t included, so I removed them from my project and was able to move on to the next problem. (I see unistd.h included twice, lines 5 and 7, just fyi. I initially had tried your suggestion of commenting them out, but that lead to even more compiler errors.)

I had, up to this point, been configuring the C/C++ and Linker properties as needed to satisfy the compiler’s initial errors. I used the properties from the example solution to complete mine, and then used the steps to get VS packages to work in VS EE 2008, by you, from-here to solve the last problem. It now builds successfully as a static library and I created a minimal project to test it - so far, it seems to work just great. However, I do get 958 linker warnings! :shock:

Thanks for the reply.