致命错误LNK1104:无法打开文件'sfml-graphics-s-d.lib'

时间:2015-06-12 18:36:38

标签: c++ visual-studio opengl sfml

当我尝试在Visual C ++(Visual Studio 2013)中编译项目时,我收到如下所示的错误。

1>------ Build started: Project: SFMLTest3D, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'sfml-graphics-s-d.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我是非常新的Visual Studio,所以我使用了教程herehere来设置依赖项和所有内容。

在我的文件顶部,我有以下标题:

#include <sfml.h>

文件sfml.h包含以下内容:

#pragma once
#ifndef SFMLFULL_INCLUDED
#define SFMLFULL_INCLUDED

#define SFML_STATIC

#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>

#if defined(_DEBUG) || defined(DEBUG)
    #pragma comment(lib,"sfml-graphics-s-d.lib")
    #pragma comment(lib,"sfml-audio-s-d.lib")
    #pragma comment(lib,"sfml-network-s-d.lib")
    #pragma comment(lib,"sfml-window-s-d.lib")
    #pragma comment(lib,"sfml-system-s-d.lib")
    #pragma comment(lib,"sfml-main-d.lib")
#else
    #pragma comment(lib,"sfml-graphics-s.lib")
    #pragma comment(lib,"sfml-audio-s.lib")
    #pragma comment(lib,"sfml-network-s.lib")
    #pragma comment(lib,"sfml-window-s.lib")
    #pragma comment(lib,"sfml-system-s.lib")
    #pragma comment(lib,"sfml-main.lib")
#endif

#endif // SFMLFULL_INCLUDED

该文件位于..\SFML-2.3\include\sfml.h

下面的屏幕截图显示了sfml-graphics-s-d.lib文件的位置:

Screenshot

有人可以解释我在这里缺少的东西吗?如果您需要任何进一步的信息,请告诉我,我会尽力提供。

编辑:根据信息here,我尝试了几项操作,包括完全重新启动计算机,但项目仍然无法编译。

0 个答案:

没有答案