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

Author Topic: SFML static : window won't open  (Read 1108 times)

0 Members and 1 Guest are viewing this topic.

AnselmeSfml

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Email
SFML static : window won't open
« on: July 04, 2017, 02:27:53 pm »
Hello !  :D

I built my application with SFML statically linked on Windows. There were no problems during compilation.
But when I launch my application, my window does not appear. The only thing that appears is the Windows's terminal.

I worked on my project on Linux so when I had to build for Windows, I installed on my Windows computer a standalone version of the "make" command.

Here is the makefile :

CXXFLAGS = -DSFML_STATIC -std=c++14 -c -ISFML/include/
SFMLLIB = -LSFML/lib/ -lsfml-graphics-s -lsfml-window-s -lsfml-audio-s -lsfml-system-s -lopenal32 -lvorbisfile -lvorbisenc -lvorbis -logg -lFLAC -ljpeg -lfreetype -lgdi32 -lopengl32 -lwinmm

OBJECTS = main.o Snake.o Inputs.o FoodPoints.o Point.o Random.o SoundSystem.o TileBackground.o ScoreSystem.o Gui.o

CCXX = g++

all : $(OBJECTS)
        $(CCXX) $(OBJECTS) $(SFMLLIB) -o snake

main.o : src/main.cpp
        $(CCXX) $(CXXFLAGS) src/main.cpp

Snake.o : src/Snake.cpp
        $(CCXX) $(CXXFLAGS) src/Snake.cpp

Inputs.o : src/Inputs.cpp
        $(CCXX) $(CXXFLAGS) src/Inputs.cpp

FoodPoints.o : src/FoodPoints.cpp
        $(CCXX) $(CXXFLAGS) src/FoodPoints.cpp

Point.o : src/Point.cpp
        $(CCXX) $(CXXFLAGS) src/Point.cpp

Random.o : src/Random.cpp
        $(CCXX) $(CXXFLAGS) src/Random.cpp

SoundSystem.o : src/SoundSystem.cpp
        $(CCXX) $(CXXFLAGS) src/SoundSystem.cpp

TileBackground.o : src/TileBackground.cpp
        $(CCXX) $(CXXFLAGS) src/TileBackground.cpp

ScoreSystem.o : src/ScoreSystem.cpp
        $(CCXX) $(CXXFLAGS) src/ScoreSystem.cpp

Gui.o : src/Gui.cpp
        $(CCXX) $(CXXFLAGS) src/Gui.cpp

clean :
        rm snake *.o
 

Anyone knows what the problem is ? When I was linking SFML dynamically my window was showing as expected.

Thank you !

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: SFML static : window won't open
« Reply #1 on: July 04, 2017, 03:09:19 pm »
Is the created window larger than your screen?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

AnselmeSfml

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Email
Re: SFML static : window won't open
« Reply #2 on: July 04, 2017, 03:15:43 pm »
No, the window is 500x500, something like that, so it is smaller than my screen. :/
Thank you

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10821
    • View Profile
    • development blog
    • Email
Re: SFML static : window won't open
« Reply #3 on: July 04, 2017, 03:37:35 pm »
If you build the SFML examples, do they work (the ones that create a window)?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

AnselmeSfml

  • Jr. Member
  • **
  • Posts: 78
    • View Profile
    • Email
Re: SFML static : window won't open
« Reply #4 on: July 04, 2017, 03:56:15 pm »
No, even with the tutorials examples the window won't open.

 

anything