generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: C++ help needed

Previous Thread :: Next Thread 
TheUnix is not online. 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 is not online. 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
enumeration is not online. enumeration
Joined: 17 Dec 2011
Total Posts: 2552
23 Mar 2012 04:22 PM
[ Content Deleted ]
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
23 Mar 2012 04:24 PM
GetEvent...?
Report Abuse
Legend26 is not online. 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 is not online. 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 is not online. 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 is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
23 Mar 2012 04:30 PM
Well? Did you try GetEvent?
Report Abuse
myrkos is not online. 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
enumeration is not online. enumeration
Joined: 17 Dec 2011
Total Posts: 2552
23 Mar 2012 04:31 PM
[ Content Deleted ]
Report Abuse
TheUnix is not online. 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 is not online. 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 is not online. 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 is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
23 Mar 2012 04:44 PM
it is
Report Abuse
TheUnix is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image