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 - lagoru

Pages: [1]
1
Window / Re: SFML 2.0 gamepad not detected
« on: October 03, 2012, 04:02:15 pm »
Also tried tricks in first and second post before posting - no difference.


The last one helped :) thank you very much :)

2
Window / SFML 2.0 gamepad not detected
« on: October 03, 2012, 03:39:25 pm »
Hi, I have a problem with gamepad I want to use with SFML 2.0. Library just can't detect it.
Code used:
if (sf::Joystick::isConnected(0))
        {
            cout << "Is connected " << endl;
        }
        else
        {
            cout << "Not connected" << endl;
        }

I only include SFML/Window/Joystick.hpp. Library looks that is working fine (it detects keyboard).
IDE: QT Creator (MinGW compiler), System: Windows 7
also tried on CODE::BLOCKS.

System detects gamepads (checked in control panel), all buttons and levers work fine.
Gamepads tried: esperanza Warrior, Apollo GP 3020.

3
General / Re: using SFML 2.0 in Qt4
« on: September 28, 2012, 03:53:37 pm »
As I said before the problem is really stupid:
One character more and working:

new: LIBS *= -L"C:\SFML\LIBS" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

old: LIBS *= -L"C:\SFML\LIB" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

This mistake can be found on many websites - and I think that many careless people like me could fall for that one.

EDIT: no it's not this stupid. If you use QT Creator you must include just bin folder (not lib), i don't know why and what is the difference:

new: LIBS *= -L"C:\SFML\BIN" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

Solved - for future user who would want to run SMFL 2.0 on QT Creator:

1. download proper version of SMFL 2.0 (depends from version of QT- it can be MSVC 2008 or MinGW (CODE::BLOCKS)- this version I have)
1. copy to pro file:

LIBS *= -L"C:\SFML\BIN" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

INCLUDEPATH += C:\SFML\include

2. Write program and enjoy working library.

4
General / Re: using SFML 2.0 in Qt4
« on: September 28, 2012, 02:15:17 pm »
OK. Now I managed to Run SFML on CODE::BLOCKS. Of course problem in run it properly was stupid and was my fault - i forgot to copy dll to compiler executables  :-[ But still not managed to run it on Qt...

5
General / Re: using SFML 2.0 in Qt4
« on: September 28, 2012, 01:02:05 pm »
Anyone ? I already been sitting on this for 3 days - searching in google and looking in forums. I think that it's rather simple - but I can't just figure out what I'm doing wrong.
I don't have much experience in Qt and C++ (I'm used to Java). The only reason I'm doing that in C++ is because my professor that is leading my degree project (I'm creating Quadrocopter steering module) forces me to do that way. I already also tried to run SFML in CODE::BLOCKS (trying to go by tutorial) and also nothing working.

6
General / Re: using SFML 2.0 in Qt4
« on: September 27, 2012, 01:04:38 pm »
Wow - you are fast  :) I'm using QTCreator as IDE.
Full error: "undefined reference to `_imp___ZN2sf8Joystick11isConnectedEj'" (so it cannot find function which i wrote in my previous post).
and also "Id returned 1 exit status" - this will rather not add anything helpful.
I'm not sure what you mean by "Is your Qt Creator settings set to debug" but I'm also debugging.

7
General / using SFML 2.0 in Qt4
« on: September 27, 2012, 12:45:15 pm »
I have a question about using SFML 2.0 in QT 4.8.1 (MinGW). I cannot force my application to just get working (I get "undefined reference to" errors). In my .pro file i attach:

LIBS *= -L"C:\SFML\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-main

INCLUDEPATH += C:\SFML\include

the most important code fragments in main:

#include  "SFML/Window.hpp"
...
sf::Joystick::isConnected(0) // this where i get linking problems

I've already tried to change my build options on MSVC and try to recompile but it not helped nothing at all.
My question is: What am I doing wrong ? I already read all what I could find on the SMFL webside and google.

Pages: [1]