Git Product home page Git Product logo

Comments (5)

gazpachu avatar gazpachu commented on July 16, 2024

I'm also having the same problem in Windows 7, CodeBlocks 12.11 with MinGW and OF v.0.8.0 :(

I've tried to link the VS2008/OIS_static.lib and also VS2010/OIS_vs2010_static.lib but it doesn't work

from ofxgamepad.

underdoeg avatar underdoeg commented on July 16, 2024

Hi. The problem is that the addon currently only has compiled OIS libraries for visual studio. Those won't work with Code::Blocks. You can try to compile OIS yourself by downloading it from here: http://sourceforge.net/projects/wgois/ from what I can see it has a codeblocks project file included in the zip.

I don't have a windows development environement atm so I can't do it. But I can try to help if you run into any problems...

from ofxgamepad.

gazpachu avatar gazpachu commented on July 16, 2024

That makes sense...

I've downloaded it and tried to compile it but it throw some errors:

||=== OIS, Release ===|
..\includes\win32\Win32ForceFeedback.h||In constructor 'OIS::Win32ForceFeedback::Win32ForceFeedback(IDirectInputDevice8A_, const DIDEVCAPS_)':|
..\includes\win32\Win32ForceFeedback.h|105|warning: 'OIS::Win32ForceFeedback::mFFAxes' will be initialized after [-Wreorder]|
..\includes\win32\Win32ForceFeedback.h|102|warning: 'const DIDEVCAPS* OIS::Win32ForceFeedback::mpDIJoyCaps' [-Wreorder]|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|39|warning: when initialized here [-Wreorder]|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'virtual short unsigned int OIS::Win32ForceFeedback::getFFMemoryLoad()':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|85|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'virtual void OIS::Win32ForceFeedback::setMasterGain(float)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|162|warning: unused variable 'hr' [-Wunused-variable]|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'virtual void OIS::Win32ForceFeedback::setAutoCenterMode(bool)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|185|warning: unused variable 'hr' [-Wunused-variable]|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'void OIS::Win32ForceFeedback::updateConstantEffect(const OIS::Effect)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|198|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|198|error: 'lX' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|198|error: 'offsetof' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|198|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|198|error: 'lY' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'void OIS::Win32ForceFeedback::updateRampEffect(const OIS::Effect)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|222|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|222|error: 'lX' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|222|error: 'offsetof' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|222|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|222|error: 'lY' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'void OIS::Win32ForceFeedback::updatePeriodicEffect(const OIS::Effect)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|241|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|241|error: 'lX' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|241|error: 'offsetof' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|241|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|241|error: 'lY' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'void OIS::Win32ForceFeedback::updateConditionalEffect(const OIS::Effect)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|271|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|271|error: 'lX' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|271|error: 'offsetof' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|271|error: expected primary-expression before ',' token|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|271|error: 'lY' was not declared in this scope|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp||In member function 'void OIS::Win32ForceFeedback::upload(GUID, DIEFFECT, const OIS::Effect_)':|
C:\Users\jmira\Desktop\ois-v1-3\ois-v1-3\src\win32\Win32ForceFeedback.cpp|415|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
||=== Build finished: 20 errors, 7 warnings (0 minutes, 7 seconds) ===|

from ofxgamepad.

underdoeg avatar underdoeg commented on July 16, 2024

dammit... :) But I just had an idea. afaik OIS is included with ogre. it is probably a part of this download. http://sourceforge.net/projects/ogre/files/ogre/1.8/1.8.1/OgreSDK_MinGW_v1-8-1.exe/download

from ofxgamepad.

gazpachu avatar gazpachu commented on July 16, 2024

We are getting close...

After downloading Ogre, I got the "libOIS.dll.a" file and placed it in the "lib folder of ofxGamepad.

Then I moved the "OIS.dll" file into the "data" folder of my app.

Then run the app and I got the following error:

lib error

I've downloaded the "libstdc++-6.dll" file from the Internet and placed it in the "data" folder.

Now the app runs but crashes right away if I use ofxGamepadHandler::get() in the setup method.

If I leave the setup method empty, the app runs okay.

Any idea?

void testApp::setup(){
    ofxGamepadHandler::get()->enableHotplug();
    //CHECK IF THERE EVEN IS A GAMEPAD CONNECTED
    if(ofxGamepadHandler::get()->getNumPads()>0){
            ofxGamepad* pad = ofxGamepadHandler::get()->getGamepad(0);
            ofAddListener(pad->onAxisChanged, this, &testApp::axisChanged);
            ofAddListener(pad->onButtonPressed, this, &testApp::buttonPressed);
            ofAddListener(pad->onButtonReleased, this, &testApp::buttonReleased);
    }
}

from ofxgamepad.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.