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

Author Topic: Trouble with setup  (Read 1530 times)

0 Members and 1 Guest are viewing this topic.

drm4652

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Trouble with setup
« on: June 21, 2013, 12:33:37 am »
Hello,

Recently I've been looking into learning some Game Development APIs for C++ so I wanted to try SFML. I have followed the step by step guide located here:

http://www.sfml-dev.org/tutorials/2.0/start-vc.php

I am using Visual Studios 2010 on Windows 7. When I compile the code, I get the following errors
Code: [Select]
1>------ Build started: Project: GameTest2, Configuration: Debug Win32 ------
1>main.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>main.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>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::close(void)" (__imp_?close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::pollEvent(class sf::Event &)" (__imp_?pollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::isOpen(void)const " (__imp_?isOpen@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::~String(void)" (__imp_??1String@sf@@QAE@XZ) referenced in function _main
1>main.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>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::String::String(char const *,class std::locale const &)" (__imp_??0String@sf@@QAE@PBDABVlocale@std@@@Z) referenced in function _main
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Dan\documents\visual studio 2010\Projects\GameTest2\Debug\GameTest2.exe : fatal error LNK1120: 8 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've looked into this issue for hours and couldn't find a solution. Clearly it's not recognizing the API but I can't figure out why because I followed the steps. Any help would be greatly appreciated.

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Trouble with setup
« Reply #1 on: June 21, 2013, 01:20:28 am »
Seems like your linker settings aren't quite right or you just mistyped something.  Go through the tutorial again and read all the extra boxes and everything.  I know the VS2010 tutorial works fine, i've been though it many times and have never had a problem with it.

If it still gives you troubles throw up a complete & minimal program with some
Code: [Select]
tags and screens of your project setting if you feel the need.

drm4652

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Trouble with setup
« Reply #2 on: June 21, 2013, 03:38:35 am »
I redid the tutorial(not sure what I changed) and now it is saying that sfml-system-d-2.dll is missing from my computer which it isn't. I feel like there is some confusion or a glossed over step with the DLLs, I skipped the static part, it didn't sound like it was required and adding it didn't fix it.

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Trouble with setup
« Reply #3 on: June 21, 2013, 03:52:54 am »
If you are linking dynamically (not using the SFML_STATIC #define) then you need to include the correct *.dll files located in your SFML2.0/bin/ folder.  copy all those dll's to where your project runs its debug executable.

drm4652

  • Newbie
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Trouble with setup
« Reply #4 on: June 21, 2013, 05:26:17 am »
Got it to work, Awesome! Thanks for the help.