无法打开文件 'sfml-graphicsd.lib'
Cannot open file 'sfml-graphicsd.lib'
我最近拿起了这本书Beginning C++ Game Programming
。我尽可能准确地遵循这本书。我是一名 Java 开发人员,拥有大约 2 年的经验,希望学习 C++。我认为在学习游戏编程的同时学习它会很有趣。
所以我得到了错误 1>LINK : fatal error LNK1104: cannot open file 'sfml-graphicsd.lib'
。我已经将包含添加到文件中,我已经在 C++、链接器和调试项目属性中添加了额外的包含和库。我将包含代码,目前还没有任何内容,我只是想查看正在创建但已经出现编译器错误的 window。
我注意到实际文件名是 sfml-graphics-d.lib
而编译器似乎试图打开 sfml-graphicsd.lib
。我已经检查了我下载的 SFML
的版本,它是 Visual C++ 14 (2015) - 32-bit
并且我正在编译 win32.
代码:
// Samurai.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <SFML\Graphics.hpp>
using namespace sf;
int main()
{
VideoMode vm(1920, 1080);
Window(vm, "Samurai", Style::Fullscreen);
return 0;
}
输出:
1>------ Build started: Project: Samurai, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-graphicsd.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
如果需要任何进一步的信息,请告诉我。
非常感谢大家,
欧文
我发现了错误。这是一个拼写错误 properties > debugs > linker > input
dll 文件名中没有 -
我最近拿起了这本书Beginning C++ Game Programming
。我尽可能准确地遵循这本书。我是一名 Java 开发人员,拥有大约 2 年的经验,希望学习 C++。我认为在学习游戏编程的同时学习它会很有趣。
所以我得到了错误 1>LINK : fatal error LNK1104: cannot open file 'sfml-graphicsd.lib'
。我已经将包含添加到文件中,我已经在 C++、链接器和调试项目属性中添加了额外的包含和库。我将包含代码,目前还没有任何内容,我只是想查看正在创建但已经出现编译器错误的 window。
我注意到实际文件名是 sfml-graphics-d.lib
而编译器似乎试图打开 sfml-graphicsd.lib
。我已经检查了我下载的 SFML
的版本,它是 Visual C++ 14 (2015) - 32-bit
并且我正在编译 win32.
代码:
// Samurai.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <SFML\Graphics.hpp>
using namespace sf;
int main()
{
VideoMode vm(1920, 1080);
Window(vm, "Samurai", Style::Fullscreen);
return 0;
}
输出:
1>------ Build started: Project: Samurai, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-graphicsd.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
如果需要任何进一步的信息,请告诉我。
非常感谢大家,
欧文
我发现了错误。这是一个拼写错误 properties > debugs > linker > input
dll 文件名中没有 -