Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: error LNK2019  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

bladelock

  • Newbie
  • *
  • Posts: 20
    • View Profile
error LNK2019
« on: September 04, 2011, 12:56:56 pm »
Hello, I was trying to type a code just to add a sprite. however, before i can even put in the sprite in image i get this darn error message
Code: [Select]


1>------ Build started: Project: loadsprite, Configuration: Debug Win32 ------
1>  main.cpp
1>sfml-graphics-s-d.lib(Image.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::SetActive(bool)const " (?SetActive@Window@sf@@QBE_N_N@Z) referenced in function "public: bool __thiscall sf::Image::CopyScreen(class sf::RenderWindow &,class sf::Rect<int> const &)" (?CopyScreen@Image@sf@@QAE_NAAVRenderWindow@2@ABV?$Rect@H@2@@Z)
1>sfml-graphics-s-d.lib(GraphicsContext.obj) : error LNK2019: unresolved external symbol "public: void __thiscall sf::Context::SetActive(bool)" (?SetActive@Context@sf@@QAEX_N@Z) referenced in function "public: __thiscall sf::priv::GraphicsContext::GraphicsContext(void)" (??0GraphicsContext@priv@sf@@QAE@XZ)
1>sfml-graphics-s-d.lib(GraphicsContext.obj) : error LNK2019: unresolved external symbol "public: static class sf::Context & __cdecl sf::Context::GetGlobal(void)" (?GetGlobal@Context@sf@@SAAAV12@XZ) referenced in function "public: __thiscall sf::priv::GraphicsContext::GraphicsContext(void)" (??0GraphicsContext@priv@sf@@QAE@XZ)
1>sfml-graphics-s-d.lib(GraphicsContext.obj) : error LNK2019: unresolved external symbol "public: static bool __cdecl sf::Context::IsContextActive(void)" (?IsContextActive@Context@sf@@SA_NXZ) referenced in function "public: __thiscall sf::priv::GraphicsContext::GraphicsContext(void)" (??0GraphicsContext@priv@sf@@QAE@XZ)
1>******\Debug\loadsprite.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========



here is my code so far...

Code: [Select]
#include<iostream>
#include<SFML\System.hpp>
#include<SFML\Graphics.hpp>
using namespace std;
using namespace sf;

int main()
{

sf::Image Image;
if (!Image.LoadFromFile("MarioStanding.png"))
return 1;
return 0;



I linked towards
sfml-graphics-s-d.lib
sfml-main.lib
sfml-system-s-d.lib


what's wrong with my code? How can I fix it?

Cheers

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
error LNK2019
« Reply #1 on: September 04, 2011, 01:39:25 pm »
You forgot sfml-window
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

bladelock

  • Newbie
  • *
  • Posts: 20
    • View Profile
error LNK2019
« Reply #2 on: September 04, 2011, 01:54:01 pm »
Quote from: "Groogy"
You forgot sfml-window


That did the trick. Awesome.


Now that the console shows up, it says that it "failed to load MarioStanding.png" because "png not supported".

How do i fix this

cheers