简体   繁体   中英

Cannot open file 'sfml-graphicsd.lib'

I have recently picked up the book Beginning C++ Game Programming . I am following the book as precise as I can. I am a Java dev with about 2 years experience who is looking to pick up C++. I thought it would be fun learning it while learning game programming.

So I am getting the error 1>LINK : fatal error LNK1104: cannot open file 'sfml-graphicsd.lib' . I have added the include to the file, I have added the additional include and libs in the C++, Linker and Debug project properties. I will include the code, there is nothing yet I just wanted to see the window that is being created but already getting compiler errors.

I have noticed that the actual file name is sfml-graphics-d.lib whereas the compiler seems to be trying to open sfml-graphicsd.lib . I have checked the version of SFML that I downloaded and it is Visual C++ 14 (2015) - 32-bit and I am compiling win32.

Code:

// 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;
}

Output:

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 ==========

在此处输入图片说明

Please let me know if any further information is required.

Thank you all so much,

Owen

I found the error. It was a spelling mistake in the properties > debugs > linker > input there was no - in the dll filenames

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM