LNK2019 Error under Visual Studio 2010

后端 未结 4 1375
傲寒
傲寒 2021-01-22 19:35

I have created a sample c++ project under Visual Studio 2010 with following files.

A.h

#ifndef A_H
#define A_H

#include 

void foo();

#         


        
4条回答
  •  感动是毒
    2021-01-22 19:50

    The code works when I created a new project. I am not sure but the reason of the error might be that I added the folder "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include" to the included directories at the project settings and Visual Studio already included the folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"(which is for the 32 bit programs) by default. So there might be a clash because of that. I added the opengl header files only to the Program Files(x86) include folder, removed the include for 64 bit Program Files folder and the opengl code seems to be working now.

提交回复
热议问题