I'm trying to compile OpenHMD in Visual Studio 2010. I started with a Win32 library project layout. I noticed that stdafx.cpp was created and removed that file along with generated headers. Now I still get compilation errors like these (inlined as comments):
OHMD_APIENTRY int ohmd_ctx_probe(ohmd_context* ctx)
{
memset(&ctx->list, 0, sizeof(ohmd_device_list));
int i; // <-- error C2143: syntax error : missing ';' before 'type'
for(i = 0; i < ctx->num_drivers; i++){ // <-- error C2065: 'i' : undeclared identifier
ctx->drivers[i]->get_device_list(ctx->drivers[i], &ctx->list);
}
return ctx->list.num_devices;
}
Where can I force plain C compilation or set the C-Language level C99? This appears to be a C89 issue?
Note: I already changed the for
loop from
for(int i = 0; ...
to
int i;
for( i = 0; ...