Comments (5)
Yup. Here's a guide:
http://lazyfoo.net/tutorials/SDL/01_hello_SDL/mac/index.php
from agsjoy.
testing how to build agsjoy for OSX
Go to:
https://libsdl.org/download-2.0.php
Download the latest stable release. Place in a folder (I placed in my_home/Dev), cd to it and do:
./configure
make
sudo make install
Right now I am having the error:
$ clang++ agsjoy.cpp -Wall -framework SDL2 -dynamiclib -o libagsjoy.dylib
agsjoy.cpp:255:55: warning: operator '>>' has lower precedence than '-'; '-'
will be evaluated first [-Wshift-op-parentheses]
theJoy.buttons = theJoy.buttons & (4294967295-1>>ev.jbutton.button);
~~~~~~~~~~^~~~
agsjoy.cpp:255:55: note: place parentheses around the '-' expression to silence
this warning
theJoy.buttons = theJoy.buttons & (4294967295-1>>ev.jbutton.button);
^
( )
agsjoy.cpp:230:7: warning: unused variable 'ax' [-Wunused-variable]
int ax;
^
agsjoy.cpp:231:7: warning: unused variable 'b' [-Wunused-variable]
int b;
^
3 warnings generated.
ld: framework not found SDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So I guess I didn’t correctly installed the SDL2 framework (ld: framework not found SDL2).
from agsjoy.
After downloading the development library of SDL2 (SDL2-2.0.8.dmg), opening it, and copying the SDL2.framework to /Library/Frameworks/ and doing the codesign codesign -f -s - SDL2
on /Library/Frameworks/SDL2.framework/
, it was possible to build using:
clang++ agsjoy.cpp -Wall -framework SDL2 -F /Library/Frameworks/ -dynamiclib -o libagsjoy.dylib
with this, it was possible to generate the dylib : libagsjoy.dylib.zip
Only GetName should work because conflict with SDL_pollevent, see branch ags-sdl2-port-fix for fix.
Merged the branch in a default way to check for SDL initialization
from agsjoy.
A new and working libagsjoy.dylib has been added on the releases. I still don't know yet how to properly include the plugin in the MAC OSX port, but at least it should work.
from agsjoy.
@256colour , can you verify if it's working on MacOS ?
from agsjoy.
Related Issues (8)
- Problems with amd64 build? HOT 2
- simplify windows and linux code to one HOT 1
- Pass enums, constants and other information for AGS Editor HOT 1
- MFI game controller support
- Allow rumble control through the plugin HOT 8
- Switch from Joystick to Gamecontrollers
- Doesn't work if the SDL2 Digi audio driver is used HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agsjoy.