TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 03:04 PM |
Since i'm being blocked for this containing something that's against the rules, here's the main of the code:
sf::RenderWindow Screen (sf::VideoMode(800, 600, 32), "Title"); Screen.Display();
Compiles fine, but expects input in a console window and doesn't open a 800x600 window... |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:06 PM |
I worked it out. I didn't have the lib files needed. New problem:
while (Window.PollEvent(Event))
error: 'class sf::RenderWindow' has no member named 'PollEvent' |
|
|
| Report Abuse |
|
|
| |
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
| |
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 23 Mar 2012 04:25 PM |
| Make sure you've actually compiled it right and are using the correct documentation... |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:28 PM |
@Enum It's suppost to be a good game programming C++ library. |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:30 PM |
| Thank you everyone. It now compiles and builds, but again no window opens. Only a console window. |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:30 PM |
| Well? Did you try GetEvent? |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:31 PM |
latepoast.
Do you by any chance have an ATI graphics card and are running Windows? |
|
|
| Report Abuse |
|
|
| |
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:42 PM |
I'm running Windows 7 Ultimate and the following graphics card. AMD HD 6570 1GB |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:43 PM |
| SFML has a known bug for not showing the window on such systems. You need to statically link SFML as a workaround, or use SFML 2. |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:43 PM |
| Semi-offtopic is it correct that SFML is multi platform? Becuase it has downloads for Linux. |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
| |
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:44 PM |
| Could you provide some steps on staticaly linking? Thank you. |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 23 Mar 2012 04:44 PM |
Yes it's mutli platform...
Why else would there be dls for Linux? |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:46 PM |
| What I mean is, if I compile binaries on Windows, will they run on a Linux distro? |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:47 PM |
Get sfml-system-s.a, sfml-window-s.a, etc. and add them to the GCC command (example: "gcc main.cpp -o main /path/to/sfml-window-s.a etc.")
I assume you're using MinGW... |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:48 PM |
>What I mean is, if I compile binaries on Windows, will they run on a Linux distro?
NO.
Windows exe files can't run on other OSs! (WINE is another thing) |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:49 PM |
| Oh yes, i've found those .a files before. Where do I need to add the names of these files? |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:50 PM |
Are you using Code::blocks?
Idk, but there should be a list of library dependencies, where you put the file paths. |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:50 PM |
| Okay. But will the same code that I type on Windows compile on Linux? |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:51 PM |
Yes, I'm using Code::blocks
PS: Thanks for heaps of help XD |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 23 Mar 2012 04:52 PM |
>Okay. But will the same code that I type on Windows compile on Linux?
If you're not using any other Windows-only libraries, then yes. |
|
|
| Report Abuse |
|
|
TheUnix
|
  |
| Joined: 21 Mar 2012 |
| Total Posts: 80 |
|
|
| 23 Mar 2012 04:53 PM |
Yes, in the source code i'm only including SFML graphics headers.
Any help on the Code::blocks static linking problem? |
|
|
| Report Abuse |
|
|