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

Author Topic: Compiling on Windows  (Read 1696 times)

0 Members and 1 Guest are viewing this topic.

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Compiling on Windows
« on: February 21, 2013, 07:31:34 am »
Hello there! I have recently been coding a small game using SFML, it is called Pokemon Pong. It's pretty much just a Pokemon themed version of the original Pong.

I'm having a slight problem though. I can not seem to get this to compile on Windows so I can share my work with friends.

It compiles, runs and plays perfect on Mac, just when ever I stick all the files into Code::Blocks on my windows VM and compile I get errors thrown at me from all directions (Not SFML, I ran a basic SFML app beforehand and it worked fine)

So if anyone is able to compile this would you be able to show me step by step how you did it?

The download below contains all the source files along with the images and sounds for the game. :)

Download: http://www.mediafire.com/?dbbmvrubgsiu3up

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Compiling on Windows
« Reply #1 on: February 21, 2013, 09:29:26 am »
Can't you describe your errors, or even try to reproduce a minimal complete example?

Most people don't feel like downloading whole projects from sites like Mediafire...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Compiling on Windows
« Reply #2 on: February 21, 2013, 09:36:05 am »
The reason I'm not posting errors is that there's so many. and I find it odd that it compiles fine on Mac but then on Windows all my code is suddenly wrong. :/

I guess I'll post some of the errors tomorrow if no one has managed to help (I'm about to sleep and I'm not booting up my VM again atm haha)

Also the download is less than a megabyte I didn't think it would be that much of a hassle :o

Thank you for the reply. :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Compiling on Windows
« Reply #3 on: February 21, 2013, 09:44:05 am »
Works fine on my end. > Binary <
  • Create a new and empty project.
  • Add all the *.h, *.cpp and *.hpp files to the project.
  • Create a ResourcePath.cpp and implement the function resourcePath() (e.g. return "./";).
  • Add the paths and libs to the settings, as described in the official tutorial.
  • Build and run.
Make sure that your SFML version matches your compiler version.
What SFML version do you use, i.e. from where did you get it?

Btw. you should always (!) process the sf::Event::Closed event, it's quite annoying if one can't close the window. And I suggest you should use sf::Keyboard for the input, rather than the events, so the paddle will instantly move and you won't have to wait, till the key repeat kicks in.
« Last Edit: February 21, 2013, 10:11:17 am by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

MarcuzPwnz

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Compiling on Windows
« Reply #4 on: February 21, 2013, 09:53:30 am »
Thank you eXpl0it3r. I will give this another go in the morning.

As for you being un able to close the window, I'm sorry about that, I usually remember to handle that even but with XCode I can simply click the stop button and it closes for me so I haven't needed to use the close button on the window yet.

As for the tips with the keyboard events, thank you, I'll be sure to do what you have suggested! :)
« Last Edit: February 21, 2013, 07:39:28 pm by MarcuzPwnz »

 

anything