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

Author Topic: Tutorial "Opening a window" code doesn't work righ  (Read 9830 times)

0 Members and 1 Guest are viewing this topic.

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« on: November 06, 2011, 09:17:13 am »
Everything compiles and links properly, but when the application runs, all I get is an empty console window, and no SFLM window. Any ideas? The .dlls are in the same directory as the .exe. I get a bunch of "Cannot find or open the PDB file" in the debug when I run. Not sure if this is problem.

Any ideas?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Tutorial "Opening a window" code doesn't work righ
« Reply #1 on: November 06, 2011, 09:56:53 am »
SFML 1.6? ATI graphics card?
Laurent Gomila - SFML developer

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #2 on: November 06, 2011, 07:03:21 pm »
Quote from: "Laurent"
SFML 1.6? ATI graphics card?

Yes and yes.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Tutorial "Opening a window" code doesn't work righ
« Reply #3 on: November 06, 2011, 08:03:46 pm »
=> Known bug ;)
Laurent Gomila - SFML developer

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #4 on: November 06, 2011, 08:21:36 pm »
Quote from: "Laurent"
=> Known bug ;)

Well, what can I do now? Is the library useless to me until it's fixed or what?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #5 on: November 06, 2011, 08:58:44 pm »
Quote from: "Bacu"
Quote from: "Laurent"
=> Known bug ;)

Well, what can I do now? Is the library useless to me until it's fixed or what?
Use SFML2.
I use the latest build of SFML2

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #6 on: November 06, 2011, 09:07:25 pm »
Quote from: "OniLink10"
Quote from: "Bacu"
Quote from: "Laurent"
=> Known bug ;)

Well, what can I do now? Is the library useless to me until it's fixed or what?
Use SFML2.

I assume that all of the tutorials that are for 1.6 will more or less work for 2.0?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #7 on: November 06, 2011, 09:41:34 pm »
Quote from: "Bacu"
Quote from: "OniLink10"
Quote from: "Bacu"
Quote from: "Laurent"
=> Known bug ;)

Well, what can I do now? Is the library useless to me until it's fixed or what?
Use SFML2.

I assume that all of the tutorials that are for 1.6 will more or less work for 2.0?
Yes, and when they don't, it's probably because the name of something may have changed. For example, sf::Image has split into sf::Texture (what you want to use for rendering) and sf::Image (stored in memory only)
I use the latest build of SFML2

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #8 on: November 06, 2011, 11:02:28 pm »
Laurent, I know SFML 2 hasn't officially been released as yet, but why not take down the 1.6 link? The more people who use 2, the better, and it's so stable now anyway.

It would also help stop problems like this :-)
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Tutorial "Opening a window" code doesn't work righ
« Reply #9 on: November 06, 2011, 11:53:48 pm »
SFML 1.6 is still the latest official version, I can't hide it.

Regarding the initial problem, static linking should also solve it ;)
Laurent Gomila - SFML developer

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #10 on: November 07, 2011, 01:57:12 am »
Oh boy, more problems. I followed the instructions on using Cmake to put everything together, but I get this error:
Code: [Select]
CMake Error at CMakeLists.txt:131 (add_subdirectory):
  add_subdirectory given source "src/SFML" which is not an existing
  directory.


CMake Error at examples/ftp/CMakeLists.txt:8 (sfml_add_example):
  Unknown CMake command "sfml_add_example".


Configuring incomplete, errors occurred!

groan.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Tutorial "Opening a window" code doesn't work righ
« Reply #11 on: November 07, 2011, 07:53:12 am »
Seems like your SFML directory is messed up. Try to download it again.
Laurent Gomila - SFML developer

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #12 on: November 07, 2011, 04:42:21 pm »
Quote from: "Laurent"
Seems like your SFML directory is messed up. Try to download it again.

Something was off with the download. The first time I extracted the .rar, it gave me an error. I downloaded and extracted over again but it kept happening; but if I extracted, got the error, then extracted and replaced all, I didn't get the error and Cmake did its job with no trouble.

But noooooooooow I've built the example and the same thing still happens. When I run the program, it also asks for sfml-window.dll and sfml-system.dll in addition to sfml-window-2.dll and sfml-system-2.dll. I tried using 1.6 dlls to no avail. Copying and renaming the -2.dlls gave errors.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Tutorial "Opening a window" code doesn't work righ
« Reply #13 on: November 07, 2011, 04:45:17 pm »
Something is seriously messed up, it's like you're mixing SFML 1.6 and 2.0.

Remove everything related to SFML and try again.
Laurent Gomila - SFML developer

Bacu

  • Newbie
  • *
  • Posts: 21
    • View Profile
Tutorial "Opening a window" code doesn't work righ
« Reply #14 on: November 07, 2011, 09:25:54 pm »
Quote from: "Laurent"
Something is seriously messed up, it's like you're mixing SFML 1.6 and 2.0.

Remove everything related to SFML and try again.

alright, getting closer. Builds and runs and I get a window, but the window's 'X' close button doesn't seem to work, nor does the minimize, nor can I drag the window around. I can only close it by closing the console it's running from. The debug information says that it doesn't exit with "0" as its return value.