Apparently you have to link in some libraries. Seems at least libstdc++ and some kind of library related to Ogg Vorbis.
Apparently you have to link in some libraries. Seems at least libstdc++ and some kind of library related to Ogg Vorbis.
Yes, you can.
If the amount of dependencies is high I would consider to dlopen the library rather than linking to it; since a high number of direct dependencies makes you vulnerable to incompatibilities versions between those libraries.
[quote="dmantione"]Apparently you have to ]
If it helps, I have a makefile for a C code demo that compiles using the devkitGP2X which uses most of the SDL libs including SDL_mixer...
So I assume I already have all the libs I need...I must not be linking correctly or somethingCode:CROSS_COMPILE = C:/devkitGP2X/bin/arm-linux- SDL_BASE = C:/devkitGP2X/bin/arm-linux- LDFLAGS = -static CXX = $(CROSS_COMPILE)g++ STRIP = $(CROSS_COMPILE)strip CXXFLAGS = -I"C:/devkitGP2X/include" -I"C:/devkitGP2X/include/SDL" -DTARGET_GP2X -O2 -Wall LIBS = -L"C:/devkitGP2X/lib" -lSDL -lSDL_gfx --start-group -lSDL_ttf -lfreetype -lSDL --end-group -lSDL_image -ljpeg -lpng12 -lz --start-group -lSDL_mixer -lvorbisidec -lmikmod -lsmpeg -lSDL --end-group -lgcc -lm -lc -lexpat -lpthread -ldl TARGET = sdltest.gpe OBJS = sdltest.o ALL_TARGETS = $(TARGET) all: $(ALL_TARGETS) $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(STRIP) $(TARGET) clean: rm *.o rm $(TARGET)
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Yes, you might have them, but did you $linklib them?
[quote="dmantione"]Yes, you might have them, but did you $]
I assume I would use $linklib in the .pas file?
I already do this for my own c library:
How would I use $linklib for other libraries to this as well?Code:{$link gp2x_sdl_mixer_c.o} {$linklib c}
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
I have tried adding that and similar into the gp2x_sdl_mixer.pas but to no availOriginally Posted by savage
I am trying to get around using the smpeg.pas and sdl_mixer.pas units as a test and use the c library (gp2x_sdl_mixer_c.o) instead via the gp2x_sdl_mixer.pas file.
cheers,
Pau;
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
For nds I use static linking in this way:
[pascal]{$linklib libsmpeg.a}[/pascal]
Of course I added the path of these libs on my fpc.cfg
Some times I need to link some other libs, likeCode:-FlE:\devkitpro\libnds\lib -FlE:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.1.2 -FlE:\devkitpro\devkitARM\lib\gcc\arm-eabi\4.1.2\thumb -FlE:\devkitpro\devkitARM\arm-eabi\lib -FlE:\devkitpro\devkitARM\arm-eabi\lib\thumb
[pascal]{$linklib libc.a}
{$linklib libgcc.a}
{$linklib libsysbase.a}[/pascal]
and never had problems.
I hope it could do the trick on gp2x too
Thanks for the info Legolas, I will try this :-)
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Bookmarks