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

Author Topic: Error during compile  (Read 3777 times)

0 Members and 1 Guest are viewing this topic.

snaef98

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error during compile
« on: August 31, 2010, 04:10:26 am »
Trying out tutorial:
http://www.sfml-dev.org/tutorials/1.6/window-window.php

Error:

1>KingdomOfMythos Version 2.0.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ) referenced in function _main
1>KingdomOfMythos Version 2.0.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function _main
1>KingdomOfMythos Version 2.0.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main
1>KingdomOfMythos Version 2.0.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>C:\Users\Snaef98\Documents\Visual Studio 2008\Projects\KingdomOfMythos Version 2.0\Debug\KingdomOfMythos Version 2.0.exe : fatal error LNK1120: 4 unresolved externals



Code:
Code: [Select]
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <stdafx.h>
#include <Window.hpp>
////////////////////////////////////////////////////////////
/// Entry point of application
///
///
///
////////////////////////////////////////////////////////////
int main()
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

// Start main loop
bool Running = true;
while (Running)
{
App.Display();
}
return EXIT_SUCCESS;
}
[/code]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error during compile
« Reply #1 on: August 31, 2010, 08:13:11 am »
You must link to the sfml-window module.
Laurent Gomila - SFML developer

snaef98

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error during compile
« Reply #2 on: August 31, 2010, 09:42:54 am »
I'm not exactly sure what you mean by that.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error during compile
« Reply #3 on: August 31, 2010, 10:08:11 am »
The "getting started" tutorial explains how to link to sfml-system (add it to the linker options of your project), do the same with sfml-window.
Laurent Gomila - SFML developer

snaef98

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error during compile
« Reply #4 on: August 31, 2010, 11:11:22 am »
i already did that when i set it up and it still gives errors.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error during compile
« Reply #5 on: August 31, 2010, 11:26:53 am »
Can you tell me what you did exactly?
Laurent Gomila - SFML developer

snaef98

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error during compile
« Reply #6 on: August 31, 2010, 04:13:13 pm »
I copied a copy of all the debug dlls to the programs folder under visual studio.


I set the preproccessor, lib, and linker input as well as setup the options for Vs to load from both C:/smfl verison

and placed the files in VS


i just dont get it

snaef98

  • Newbie
  • *
  • Posts: 14
    • View Profile
Error during compile
« Reply #7 on: August 31, 2010, 04:14:08 pm »
does this have anything to do with it?

Im running windows 7 64 bit

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Error during compile
« Reply #8 on: August 31, 2010, 05:03:51 pm »
Quote
I set the preproccessor, lib, and linker input

Can you tell me exactly which options you changed, and with what values?
Laurent Gomila - SFML developer

 

anything