- Home
- Discussion Forum
- AROS FORUMS
- Development General
- SDL 2.0 for AROS
SDL 2.0 for AROS
magoriumSoftware Dev
Posted 4 years agoJust to make sure we are on the same page: You are using the source-code that is found at the github link you posted earlier ?
I'm puzzled about the real suffix..... Unless i overlooked i did not see one of the macro's expand to add such suffix.
Note that creating a dynamic version of the library is something else then creating a static one.
Trying to compile as the library as linux library isn't the way to go there. You are better of trying to see what is inside the amigaos4 makefile and try to replicate that (minus the ppc specific parts ofc).
I wish i had more time on my hands so i could give it a shot myself. Cavemann/deadwood (or anyone else with a bit of c/make knowledge) not around ?
I'm puzzled about the real suffix..... Unless i overlooked i did not see one of the macro's expand to add such suffix.
Note that creating a dynamic version of the library is something else then creating a static one.
Trying to compile as the library as linux library isn't the way to go there. You are better of trying to see what is inside the amigaos4 makefile and try to replicate that (minus the ppc specific parts ofc).
I wish i had more time on my hands so i could give it a shot myself. Cavemann/deadwood (or anyone else with a bit of c/make knowledge) not around ?
MiDWaNNewbie
Posted 4 years agoWas there any more progress on this matter?
I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course
I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course
@MiDWaN - Was there any more progress on this matter?
I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course
Hello MiDWaN, welcome to AROSWorld!
I haven't made much progress unfortunately. It's on pause right now as I had to redo my virtual machines hosting AROS on them. However, I plan on picking it up again but I am no expert. I am doing it it as a learning experience as well as because no one else seems interested on porting SDL 2 to AROS.
I thought I would give it a shot. I was in contact with one of the AOS4 developers who suggested to use the MorphOS code because it's closer to AROS. I have the code here on this web site but I am going to put it on GitHub soon.
Would you be interested in collaborating?
1 user reacted to this post
MiDWaN
MiDWaNNewbie
Posted 4 years ago@amigamia -@MiDWaN - Was there any more progress on this matter?
I would like to see if I can improve Janus-UAE on AROS, and one of the things would be moving it to SDL2 - but that requires the library first, of course
Hello MiDWaN, welcome to AROSWorld!
I haven't made much progress unfortunately. It's on pause right now as I had to redo my virtual machines hosting AROS on them. However, I plan on picking it up again but I am no expert. I am doing it it as a learning experience as well as because no one else seems interested on porting SDL 2 to AROS.
I thought I would give it a shot. I was in contact with one of the AOS4 developers who suggested to use the MorphOS code because it's closer to AROS. I have the code here on this web site but I am going to put it on GitHub soon.
Would you be interested in collaborating?
Hi there!
No problem, I'd love to collaborate on this - I would probably have to look into it myself otherwise.
I just managed to get everything to compile (using SDL1) yesterday, after a lot of trial and error. The sources of Janus-UAE were a little stale for a few years, and things had changed in the meantime.
That means that the "fun" part is only starting, as the first requirement (and the pain in the butt) was making sure I have an environment that I can use to test new builds in (AROS itself, and a fool-proof way of building Janus-UAE). Well, now I have more than one (Ubuntu under Windows 11 with WSL2, Manjaro Linux) and I know more about the pitfalls of the process.
In other words, no rush and no expectations from my side. Happy to help wherever I can!
My work on Janus-UAE is on Github, since I've made some modifications already (with plenty more expected to follow): https://github.co.../janus-uae
That's fantastic work and thank you for all that! I agree with you, it was time to bring Janus-UAE up to date. I believe if we can manage to port SDL 2.0 to AROS, it is going to open a gate to a lot of new applications, games, etc. etc. but one thing that I noticed is the OS is still somewhat very unstable.
I recently managed to get AROS One 1.8 by Amigasystem on AROS-EXEC working (Supported Video, Wifi, and Audio) on a Dell Latitude D520. I struggled with the Wifi card but figured out what was the problem (will post an article in here soon). I am still experiencing occasional lock-ups, unexpected crashes, and annoyances such as a shell icon on the desktop showing multiple times after placing just one via "leave out" option.
It's frustrating and distracting when I am trying to focus on one particular problem/task and other things around go crashing.
In any case, it is still fun in trying to port a piece of software for the first time on a new OS like AROS
I recently managed to get AROS One 1.8 by Amigasystem on AROS-EXEC working (Supported Video, Wifi, and Audio) on a Dell Latitude D520. I struggled with the Wifi card but figured out what was the problem (will post an article in here soon). I am still experiencing occasional lock-ups, unexpected crashes, and annoyances such as a shell icon on the desktop showing multiple times after placing just one via "leave out" option.
It's frustrating and distracting when I am trying to focus on one particular problem/task and other things around go crashing.
In any case, it is still fun in trying to port a piece of software for the first time on a new OS like AROS
@MiDWaN There is finally a brave one who has ventured into the SDL 2 porting for AROS and is succeding...
https://arosworld.org/infusions/forum/viewthread.php?thread_id=1443&pid=8854#post_8854
https://arosworld.org/infusions/forum/viewthread.php?thread_id=1443&pid=8854#post_8854
MazzeAROS Dev
Posted 11 months agoKalamatee released a new video.
https://www.youtu...VFV3PeQDVA
SDL2 uses the software rasterizer. That's why it looks slow ATM.
https://www.youtu...VFV3PeQDVA
SDL2 uses the software rasterizer. That's why it looks slow ATM.
3 users reacted to this post
retrofaza, Argo, mmartinka
Trying to compile a game on AROS I get this error on the linking portion. Are these not yet available on SDL 2.0 AROS?
Makefile attached and below is the linking part of it:
Code Download source
There are undefined symbols in 'bin/SpaceCadetPinball':
_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILx1ELx1EEEENS1_IlS2_ILx1ELx1000000000EEEE
SDL_FreeWAV
SDL_iconv_string
SDL_strtokr
SDL_LoadWAV_RW
make: *** [bin/SpaceCadetPinball] Error 1o8Makefile attached and below is the linking part of it:
Code Download source
mkdir -p bin
g++ SpaceCadetPinball/control.o SpaceCadetPinball/EmbeddedData.o SpaceCadetPinball/font_selection.o SpaceCadetPinball/fullscrn.o SpaceCadetPinball/gdrv.o SpaceCadetPinball/GroupData.o SpaceCadetPinball/high_score.o SpaceCadetPinball/loader.o SpaceCadetPinball/maths.o SpaceCadetPinball/midi.o SpaceCadetPinball/nudge.o SpaceCadetPinball/options.o SpaceCadetPinball/partman.o SpaceCadetPinball/pb.o SpaceCadetPinball/proj.o SpaceCadetPinball/render.o SpaceCadetPinball/score.o SpaceCadetPinball/Sound.o SpaceCadetPinball/SpaceCadetPinball.o SpaceCadetPinball/TBall.o SpaceCadetPinball/TBlocker.o SpaceCadetPinball/TBumper.o SpaceCadetPinball/TCircle.o SpaceCadetPinball/TCollisionComponent.o SpaceCadetPinball/TComponentGroup.o SpaceCadetPinball/TDemo.o SpaceCadetPinball/TDrain.o SpaceCadetPinball/TEdgeManager.o SpaceCadetPinball/TEdgeSegment.o SpaceCadetPinball/TFlagSpinner.o SpaceCadetPinball/TFlipper.o SpaceCadetPinball/TFlipperEdge.o SpaceCadetPinball/TGate.o SpaceCadetPinball/THole.o SpaceCadetPinball/timer.o Space
CadetPinball/TKickback.o SpaceCadetPinball/TKickout.o SpaceCadetPinball/TLight.o SpaceCadetPinball/TLightBargraph.o SpaceCadetPinball/TLightGroup.o SpaceCadetPinball/TLightRollover.o SpaceCadetPinball/TLine.o SpaceCadetPinball/TOneway.o SpaceCadetPinball/TPinballComponent.o SpaceCadetPinball/TPinballTable.o SpaceCadetPinball/TPlunger.o SpaceCadetPinball/TPopupTarget.o SpaceCadetPinball/TRamp.o SpaceCadetPinball/translations.o SpaceCadetPinball/TRollover.o SpaceCadetPinball/TSink.o SpaceCadetPinball/TSoloTarget.o SpaceCadetPinball/TSound.o SpaceCadetPinball/TTableLayer.o SpaceCadetPinball/TTextBox.o SpaceCadetPinball/TTextBoxMessage.o SpaceCadetPinball/TTimer.o SpaceCadetPinball/TTripwire.o SpaceCadetPinball/TWall.o SpaceCadetPinball/winmain.o SpaceCadetPinball/zdrv.o SpaceCadetPinball/imgui.o SpaceCadetPinball/imgui_sdl.o SpaceCadetPinball/imgui_draw.o SpaceCadetPinball/imgui_widgets.o SpaceCadetPinball/imgui_tables.o SpaceCadetPinball/imgui_demo.o SpaceCadetPinball/imgui_impl_sdl.o SpaceCadetPinball/imgui_im
pl_sdlrenderer.o SpaceCadetPinball/DebugOverlay.o -o bin/SpaceCadetPinball -L/Development/lib -lSDL2 -lSDL2_mixer -liconv -lcharset -lgl -lgraphics -lintuition -lexpansion -lutility -lopenurl -lm -lstdc++ -lpthread
Code Download source
# AROS toolchain
CXX = g++
CC = gcc
# SDL2-config integration
SDL2_CFLAGS := $(shell sdl2-config --cflags)
SDL2_LIBS := $(shell sdl2-config --libs)
# Compiler flags
CXXFLAGS = -std=c++11 -Wall -O2
$(SDL2_CFLAGS)
# Linker flags (SDL2-config + AROS system libs)
LDFLAGS =
$(SDL2_LIBS)
-lSDL2_mixer
-liconv
-lcharset
-lgl
-lgraphics
-lintuition
-lexpansion
-lutility
-lopenurl
-lm
# Output directory
BIN_DIR = bin
TARGET = $(BIN_DIR)/SpaceCadetPinball
# Source files
SRC =
SpaceCadetPinball/control.cpp
SpaceCadetPinball/EmbeddedData.cpp
SpaceCadetPinball/font_selection.cpp
SpaceCadetPinball/fullscrn.cpp
SpaceCadetPinball/gdrv.cpp
SpaceCadetPinball/GroupData.cpp
SpaceCadetPinball/high_score.cpp
SpaceCadetPinball/loader.cpp
SpaceCadetPinball/maths.cpp
SpaceCadetPinball/midi.cpp
SpaceCadetPinball/nudge.cpp
SpaceCadetPinball/options.cpp
SpaceCadetPinball/partman.cpp
SpaceCadetPinball/pb.cpp
SpaceCadetPinball/proj.cpp
SpaceCadetPinball/render.cpp
SpaceCadetPinball/score.cpp
SpaceCadetPinball/Sound.cpp
SpaceCadetPinball/SpaceCadetPinball.cpp
SpaceCadetPinball/TBall.cpp
SpaceCadetPinball/TBlocker.cpp
SpaceCadetPinball/TBumper.cpp
SpaceCadetPinball/TCircle.cpp
SpaceCadetPinball/TCollisionComponent.cpp
SpaceCadetPinball/TComponentGroup.cpp
SpaceCadetPinball/TDemo.cpp
SpaceCadetPinball/TDrain.cpp
SpaceCadetPinball/TEdgeManager.cpp
SpaceCadetPinball/TEdgeSegment.cpp
SpaceCadetPinball/TFlagSpinner.cpp
SpaceCadetPinball/TFlipper.cpp
SpaceCadetPinball/TFlipperEdge.cpp
SpaceCadetPinball/TGate.cpp
SpaceCadetPinball/THole.cpp
SpaceCadetPinball/timer.cpp
SpaceCadetPinball/TKickback.cpp
SpaceCadetPinball/TKickout.cpp
SpaceCadetPinball/TLight.cpp
SpaceCadetPinball/TLightBargraph.cpp
SpaceCadetPinball/TLightGroup.cpp
SpaceCadetPinball/TLightRollover.cpp
SpaceCadetPinball/TLine.cpp
SpaceCadetPinball/TOneway.cpp
SpaceCadetPinball/TPinballComponent.cpp
SpaceCadetPinball/TPinballTable.cpp
SpaceCadetPinball/TPlunger.cpp
SpaceCadetPinball/TPopupTarget.cpp
SpaceCadetPinball/TRamp.cpp
SpaceCadetPinball/translations.cpp
SpaceCadetPinball/TRollover.cpp
SpaceCadetPinball/TSink.cpp
SpaceCadetPinball/TSoloTarget.cpp
SpaceCadetPinball/TSound.cpp
SpaceCadetPinball/TTableLayer.cpp
SpaceCadetPinball/TTextBox.cpp
SpaceCadetPinball/TTextBoxMessage.cpp
SpaceCadetPinball/TTimer.cpp
SpaceCadetPinball/TTripwire.cpp
SpaceCadetPinball/TWall.cpp
SpaceCadetPinball/winmain.cpp
SpaceCadetPinball/zdrv.cpp
SpaceCadetPinball/imgui.cpp
SpaceCadetPinball/imgui_sdl.cpp
SpaceCadetPinball/imgui_draw.cpp
SpaceCadetPinball/imgui_widgets.cpp
SpaceCadetPinball/imgui_tables.cpp
SpaceCadetPinball/imgui_demo.cpp
SpaceCadetPinball/imgui_impl_sdl.cpp
SpaceCadetPinball/imgui_impl_sdlrenderer.cpp
SpaceCadetPinball/DebugOverlay.cpp
OBJ = $(SRC:.cpp=.o)
all: $(TARGET)
$(TARGET): $(OBJ)
mkdir -p $(BIN_DIR)
$(CXX) $(OBJ) -o $(TARGET) $(LDFLAGS) -lstdc++ -lpthread
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(OBJ) $(TARGET)
.PHONY: all clean
Edited by amigamia on 22-07-2026 19:51, 3 days ago
sonountalebanJunior Member
Posted 2 days agoHello,
Yes, SDL2 is available, the "AI" is telling me you could try to launch the compiler using these params, maybe it works:
Yes, SDL2 is available, the "AI" is telling me you could try to launch the compiler using these params, maybe it works:
Code Download source
g++ SpaceCadetPinball/control.o SpaceCadetPinball/EmbeddedData.o SpaceCadetPinball/font_selection.o SpaceCadetPinball/fullscrn.o SpaceCadetPinball/gdrv.o SpaceCadetPinball/GroupData.o SpaceCadetPinball/high_score.o SpaceCadetPinball/loader.o SpaceCadetPinball/maths.o SpaceCadetPinball/midi.o SpaceCadetPinball/nudge.o SpaceCadetPinball/options.o SpaceCadetPinball/partman.o SpaceCadetPinball/pb.o SpaceCadetPinball/proj.o SpaceCadetPinball/render.o SpaceCadetPinball/score.o SpaceCadetPinball/Sound.o SpaceCadetPinball/SpaceCadetPinball.o SpaceCadetPinball/TBall.o SpaceCadetPinball/TBlocker.o SpaceCadetPinball/TBumper.o SpaceCadetPinball/TCircle.o SpaceCadetPinball/TCollisionComponent.o SpaceCadetPinball/TComponentGroup.o SpaceCadetPinball/TDemo.o SpaceCadetPinball/TDrain.o SpaceCadetPinball/TEdgeManager.o SpaceCadetPinball/TEdgeSegment.o SpaceCadetPinball/TFlagSpinner.o SpaceCadetPinball/TFlipper.o SpaceCadetPinball/TFlipperEdge.o SpaceCadetPinball/TGate.o SpaceCadetPinball/THole.o SpaceCadetPinball/timer.o SpaceCadetPinball/TKickback.o SpaceCadetPinball/TKickout.o SpaceCadetPinball/TLight.o SpaceCadetPinball/TLightBargraph.o SpaceCadetPinball/TLightGroup.o SpaceCadetPinball/TLightRollover.o SpaceCadetPinball/TLine.o SpaceCadetPinball/TOneway.o SpaceCadetPinball/TPinballComponent.o SpaceCadetPinball/TPinballTable.o SpaceCadetPinball/TPlunger.o SpaceCadetPinball/TPopupTarget.o SpaceCadetPinball/TRamp.o SpaceCadetPinball/translations.o SpaceCadetPinball/TRollover.o SpaceCadetPinball/TSink.o SpaceCadetPinball/TSoloTarget.o SpaceCadetPinball/TSound.o SpaceCadetPinball/TTableLayer.o SpaceCadetPinball/TTextBox.o SpaceCadetPinball/TTextBoxMessage.o SpaceCadetPinball/TTimer.o SpaceCadetPinball/TTripwire.o SpaceCadetPinball/TWall.o SpaceCadetPinball/winmain.o SpaceCadetPinball/zdrv.o SpaceCadetPinball/imgui.o SpaceCadetPinball/imgui_sdl.o SpaceCadetPinball/imgui_draw.o SpaceCadetPinball/imgui_widgets.o SpaceCadetPinball/imgui_tables.o SpaceCadetPinball/imgui_demo.o SpaceCadetPinball/imgui_impl_sdl.o SpaceCadetPinball/imgui_impl_sdlrenderer.o SpaceCadetPinball/DebugOverlay.o -o bin/SpaceCadetPinball -pthread -L/Development/lib -lSDL2_mixer -lSDL2 -lgl -lgraphics -lintuition -lexpansion -lutility -lopenurl -liconv -lcharset -lm -lpthread -lauto
deadwoodAROS Dev
Posted 2 days agoTry adding -lSDL2 at the end of LDFLAGS (after -lm)
@deadwood - Try adding -lSDL2 at the end of LDFLAGS (after -lm)
With that change, it shows more missing references in the output
deadwoodAROS Dev
Posted 1 day agoHmm, that's weird. Did you add -lSDL2 at the end or did you move $(SDL_LIBS) to the end?
In general the issue you are having is because of order of "-l" elements in LDFLAGS and cross dependencies between them. Sometimes you can only solve those cross dependencies by adding same libraries several times into LDFLAGS at different positions (libraries are resolved in order you provided)
In general the issue you are having is because of order of "-l" elements in LDFLAGS and cross dependencies between them. Sometimes you can only solve those cross dependencies by adding same libraries several times into LDFLAGS at different positions (libraries are resolved in order you provided)
Well yes I moved $(SDL_LIBS) at the end after the -lm switch but I'll try without moving that and putting a whole new line for -lSDL2 after -lm
@amigamia - Well yes I moved $(SDL_LIBS) at the end after the -lm switch but I'll try without moving that and putting a whole new line for -lSDL2 after -lm
OK That seemed to have worked but it throws these as missing:
libiconv
libiconv_open
libiconv_close
moved -liconv at the end and it took care of the last 3 missing symbols but still errors. This time states missing references but does not seem to list any. Only this:
Is there a specific order of precedence for these libraries?
Code Download source
There are undefined symbols in 'bin/SpaceCadetPinball':
_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILx1ELx1EEEENS1_IlS2_ILx1ELx1000000000EEEE
make: *** [bin/SpaceCadetPinball] Error 1µ
PIs there a specific order of precedence for these libraries?
terminillsMember
Posted 16 hours ago@amigamia - moved -liconv at the end and it took care of the last 3 missing symbols but still errors. This time states missing references but does not seem to list any. Only this:
Code Download sourceThere are undefined symbols in 'bin/SpaceCadetPinball':
_ZNSt11this_thread11__sleep_forENSt6chrono8durationIlSt5ratioILx1ELx1EEEENS1_IlS2_ILx1ELx1000000000EEEE
make: *** [bin/SpaceCadetPinball] Error 1µ
P
Is there a specific order of precedence for these libraries?
Yes... Per kalamatee.
# Linker flags (SDL2-config + AROS system libs)
LDFLAGS =
-lSDL2_mixer
$(SDL2_LIBS)
-liconv
-lcharset
-lgl
-lopenurl
-lgraphics
-lintuition
-lexpansion
-lutility
-lm
deadwoodAROS Dev
Posted 14 hours agoThis last missing symbol looks like a C++ reference - it seems to be something from stdc++, but you are alrady adding -lstdc++ at the very end so this should be resolved. The only idea I have it to have a clean rebuild of all source but with -std=c++11 removed from CXXFLAGS
No such luck. I did remove the stdc++ from the CXXFLAGS but same error. A quick search seems to point to threads. I did have -lpthreads in the linking section but not in the CXXFLAGS. Is there a switch for threads or pthreads for CXX ?
deadwoodAROS Dev
Posted 13 minutes agoWell the thing is that you should not need to add anything to CXXFLAGS for pthreads - it should alrady be same (same you should not need to add -lstdc++ -lpthread to LDFLAGS because g++ bring in those libraries automatically. What happens when you remove -lstdc++ -lpthread)?
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Moderator: Administrator, Moderators
Users who participated in discussion: cavemann, amigamia, magorium, terminills, deadwood, MiDWaN, Mazze, sonountaleban
