我习惯为Linux编译所以这个.lib的东西对我来说有点奇怪.使用Visual Studio下的程序,我不断为其他库甚至Microsoft Runtimes获取随机未解析的外部符号.
1>glfw3.lib(init.c.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf referenced in function __glfwInputError
1>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp__vsnprintf
1>glfw3.lib(context.c.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _parseVersionString
1>MSVCRTD.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol __imp___vsnprintf
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\OLDNAMES.lib : warning LNK4272: library machine type 'UNKNOWN' conflicts with target machine type 'X86'
Run Code Online (Sandbox Code Playgroud)
我只包括这些库,我可以确认它们被发现:
x86/glew32s.lib
x86/glfw3.lib
x86/glfw3dll.lib
opengl32.lib
Run Code Online (Sandbox Code Playgroud)
凭借其继承的价值观:
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
Run Code Online (Sandbox Code Playgroud)
我可以确认这是确切的顺序.我已经尝试安装并重新安装Windows 7 SDK和Visual Studio - 我也在Windows 7上. …
当我编译我的Linux程序时,我收到此错误:
error: storage class specifiers invalid for parameter declarations
Run Code Online (Sandbox Code Playgroud)
这只发生在Linux上,因为它可以很好地编译Windows.代码行是:
int Start(static const char* m_vertexshader, static const char* m_fragmentshader);
Run Code Online (Sandbox Code Playgroud)
如果您需要任何细节或信息,请使用GNU C编译器(g ++)