-1

While declaring code, I got two errors - Unresolved external symbol and 1 unresolved externals. I see that the first causes the second one. The 'graphics' folder is located in the Project Location: C:\Users\cpp_shared\documents\visual studio 2015\Projects\TIMBER\graphics

SFML libraries declared in Project->Properties->Debug->Linker->Input: sfml-graphics-d.lib;sfml-window-d.lib;sfml-system-d.lib;sfml-network-d.lib;sfml-audio-d.lib;

I would be very happy if anyone could help me :)

Code:

#include "stdafx.h"
#include <SFML/Graphics.hpp>
//Using SFML namespace
using namespace sf;

int main()
{
 //Create VideoMode object 'vm'
 VideoMode vm(1920, 1080);

 //Create RenderWindow object 'window'
 //render 'window' with params
 RenderWindow window(vm, "TIMBER", Style::Default);

 //Create Texture object 'textureBackground'
 Texture textureBackground;

 //Load image into the object 'textureBackground'
 textureBackground.loadFromFile("graphics/background.png");

 //Sprite needs a texture to display itself as an image
 //Create Sprite object 'spriteBackground'
 Sprite spriteBackground;

 //Attach the texture to the Sprite
 spriteBackground.setTexture(textureBackground);

 //Set spriteBackground to 0x0 position
 spriteBackground.setPosition(0, 0);

 //Close the window by pressing ESC
 while (window.isOpen())
 {
     if (Keyboard::isKeyPressed(Keyboard::Escape)) {
         window.close();
     }
 }

 //Clear the window before rendering new frame
 window.clear();

 //Draw spriteBackground
 window.draw(spriteBackground);

 //End current frame and display it
 window.display();

 return 0;
}

Errors:

Error LNK2001 unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)

Error LNK1120 1 unresolved externals TIMBER C:\Users\cpp_shared\documents\visual studio 2015\Projects\TIMBER\Debug\TIMBER.exe

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
  • 1
    Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Mar 01 '18 at 13:58
  • @KenWhite I don't think so! – Dominik Pavlíček Mar 01 '18 at 14:52
  • So is the problem an unresolved external symbol or is it 'unable to open file'? The latter suggests you are now able to compile and run the code, so the error in the title is no longer the issue? – Sean Burton Mar 01 '18 at 17:10
  • @SeanBurton INK2001 is still the problem. So far I found that it might be an exception thrown by invalid file - but the file path is correct! – Dominik Pavlíček Mar 01 '18 at 19:13

1 Answers1

0

Well, a solution was obvious - VS15 on WIN10 Enterprise uses Host user credentials for executing programs. Once ConnectionString was changed to AD, a program was able to read from storage.