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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CrazyBillyO

Pages: [1]
1
General / Re: Setting up SFML with Eclipse on Linux?
« on: August 19, 2014, 03:39:58 am »
If your SFML is installed under a directory on the library path, you should just have to include the libraries under the linker in the project's settings.  Under a project's properties, go to C/C++ Build -> Settings -> Tool Settings tab.  Assuming you're using GCC, under GCC C++ Linker -> Libraries individual dependencies can be added to the list of Libraries.  I usually add the following, in order, for SFML.

GL
GLEW
sfml-graphics
sfml-window
sfml-system

I tried a few quick searches but didn't find any decent documentation on this, but it's probably out there somewhere.  I suggest getting familiar with the build settings in Eclipse CDT, such as adding include and library directories, setting compiler settings, etc.  Also, if you obtained SFML from a repository, I'd check its version and consider compiling and installing the most recent version; there is a tutorial for this that makes it rather simple.

2
General / Re: Setting up SFML with Eclipse on Linux?
« on: August 18, 2014, 08:13:36 pm »
If you haven't done so already, you'll first need to install the CDT plugin (http://www.eclipse.org/cdt/) for Eclipse in order to create C++ projects.  It should be available in the marketplace.

3
The sf::Event::KeyPressed doesn't have a break after its switch.  After its cout statement executes it breaks out of the eventList.key.code switch but not the eventList.type switch, so it's falling through to the sf::Event::KeyReleased case.  Try adding a break statement after the switch in case sf::Event::KeyPressed.  I'd also recommend doing the same for case sf::Event::KeyReleased.  In fact, I'd also consider restructuring the code a little more in this area; switch statements in case statements can get somewhat confusing.

4
General / Re: [OpenGL/SFML] A sample room..
« on: August 15, 2012, 08:19:32 pm »
In addition to those tutorials, I'd also suggest http://www.arcsynthesis.org/gltut/.  I've found it to contain some good content, and it's more up-to-date.  In general, avoid tutorials, etc. that use the fixed-function pipeline and deprecated OpenGL features.

5
Other object-oriented languages, such as Java, ActionScript, etc., also typically start their method names with lower-case letters, with class/type names typically starting out upper-case.  The change puts it more in line with those and other languages.

6
General / Re: OpenGL 4.2
« on: July 31, 2012, 02:27:58 pm »
I've been using GLEW, OpenGL 4.2, and SFML 2 on  Ubuntu 12.04 with an nVidia card for a few months now and I've noticed few, if any, issues.  It should be possible.

What OS and video card do you use?  You may want to check to make sure that you're using up-to-date drivers.  It sounds like you may be defaulting to old 1.1 libraries (such as MESA on Linux, or a default 1.1  Windows DLL).

7
General / Re: Can't install on Linux
« on: June 22, 2012, 08:45:32 pm »
Yes,  that was the error. Now I have no compilition errors. But I get this error when I try to run the programm:

Quote
/clock: error while loading shared libraries: libsfml-system.so.1.6: cannot open shared object file: No such file or directory

A simple way to add libraries to your library path is to set the LD_LIBRARY_PATH environment variable to contain the directories of the libraries needed right before executing the program.  I have my IDE (Eclipse CDT) set LD_LIBRARY_PATH to the location of the SFML libraries right before it executes my program so that it knows where to find them when it runs.  Another alternative is to put the libraries in a directory on the library path, but I'm personally avoiding doing that due to 2.0 still being in RC status.  The setting of LD_LIBRARY_PATH can be put into a script of some sort so that it doesn't manually be set each time if you prefer.  I'd avoid globally setting LD_LIBRARY_PATH, as that may cause some confusion when applications search for libraries.

Pages: [1]