with the cvs-snapshot on the download-page the following happens:
Failed loading libSDLx11.so.0.9: ld.so.1: client: fatal: relocation error: file /scratch/klimek/SDL/lib/libSDLx11.so.0.9: symbol SDL_CalculateEndian: referenced symbol not found
…/share/bclient/text/en/text.txt
BClient; Version
Segmentation Fault
with the cvs-snapshot per cvs there is the same error
what am I doing wrong?
thanks
Manuel
with the cvs-snapshot on the download-page the following happens:
Failed loading libSDLx11.so.0.9: ld.so.1: client: fatal: relocation error: file /scratch/klimek/SDL/lib/libSDLx11.so.0.9: symbol SDL_CalculateEndian: referenced symbol not found
…/share/bclient/text/en/text.txt
BClient; Version
Segmentation Fault
If you look at the WhatsNew file:
The endian swapping functions have been turned into macros for speed
and SDL_CalculateEndian() has been removed. SDL_endian.h now defines
SDL_BYTEORDER as either SDL_BIG_ENDIAN or SDL_LIL_ENDIAN depending on
the endianness of the host system.
The endian read/write functions now take an SDL_RWops pointer
instead of a stdio FILE pointer, to support the new data source
abstraction.
It sounds like you are linking with an old version of libSDL.a, and then
trying to load the new shared library.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Failed loading libSDLx11.so.0.9: ld.so.1: client: fatal: relocation error: file /scratch/klimek/SDL/lib/libSDLx11.so.0.9: symbol SDL_CalculateEndian: referenced symbol not found
…/share/bclient/text/en/text.txt
BClient; Version
Segmentation Fault
The endian swapping functions have been turned into macros for speed
and SDL_CalculateEndian() has been removed. SDL_endian.h now defines
SDL_BYTEORDER as either SDL_BIG_ENDIAN or SDL_LIL_ENDIAN depending on
the endianness of the host system.
It sounds like you are linking with an old version of libSDL.a, and then
trying to load the new shared library.
ok, here is something (perhaps) intresting:
I did a make spotless
I did a cvs update
I changed in src/sunos/SDL_syscdrom.c " //#define USE_MNTENT" because with
#define USE_MNTENT it wouldn’t compile
I did a make
and then the following appears:
obj/x11/libSDLx11.so.0.9.13 -> lib/libSDLx11.so.0.9.13
lib/libSDLx11.so.0.9.13 <- lib/libSDLx11.so.0.9
obj/libSDL.a -> lib/libSDL.a
alphard:~/stuff/scratch/devel/SDL/lib 123> ls
CVS/ libSDLx11.so.0.9@
libSDL.a libSDLx11.so.0.9.13*
alphard:~/stuff/scratch/devel/SDL/lib 124> strings libSDL.a |grep Endian
alphard:~/stuff/scratch/devel/SDL/lib 125> strings libSDLx11.so.0.9.13 |grep Endian
SDL_ConvertEndian
SDL_CalculateEndian
and finaly I found that:
./SDL/obj/x11/SDL_audiocvt.c:void SDL_ConvertEndian(SDL_AudioCVT cvt, Uint16 format)
./SDL/obj/x11/SDL_audiocvt.c: / First filter: Endian conversion from src to dst */
./SDL/obj/x11/SDL_audiocvt.c: cvt->filters[cvt->filter_index++] = SDL_ConvertEndian;
./SDL/obj/x11/SDL_sysaudio.c: endian = SDL_CalculateEndian();
./SDL/src/SDL_audiocvt.c:void SDL_ConvertEndian(SDL_AudioCVT cvt, Uint16 format)
./SDL/src/SDL_audiocvt.c: / First filter: Endian conversion from src to dst */
./SDL/src/SDL_audiocvt.c: cvt->filters[cvt->filter_index++] = SDL_ConvertEndian;
./SDL/src/macos/toolbox/SDL_sysvideo.c: if ( SDL_CalculateEndian() == SDL_BIG_ENDIAN ) {
./SDL/src/sunos/SDL_sysaudio.c: endian = SDL_CalculateEndian();
cu
Manuel
These problems should be fixed with the latest CVS snapshot of SDL.
Thanks for your help, Manuel!
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Ok, the graphic is fine, but the Keyrepeat doesn’t work now…
With the same program it works with an older version…
Do I have to enable it?
I didnt find something about it in WhatsNew
cu
Manuel
Ok, the graphic is fine, but the Keyrepeat doesn’t work now…
With the same program it works with an older version…
Do I have to enable it?
I didnt find something about it in WhatsNew
Actually, key repeat isn’t supposed to work. It was a bug in previous versions.
You can simulate key repeat by keeping track of the last key pressed and the
time it was acted on and repeat the action at specified intervals. That works
pretty well.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Actually, key repeat isn’t supposed to work. It was a bug in previous versions.
You can simulate key repeat by keeping track of the last key pressed and the
time it was acted on and repeat the action at specified intervals. That works
pretty well.
hmmm, with unix I think there is no problem for the SDL to support Key-repeat
I dont know what its like with Windoze and other OSes, but I really would
be very happy about anSDL Enable_Keyrepeat function
because I dont want to write X and Win-specific Code by myself
and I think its not nice to get a different key-repeat in every program when
there is the possibility to change it OS-wide…
There is no keyrepeat on some OS’s, which is why there is no key repeat
in SDL. The method I outlined for simulating keyrepeat is platform
independent - it will work on Linux, Win32, BeOS, etc…
Here’s something like what we use in CivCTP:
initial_time = 500; /* 500 ms before key repeat is enabled /
repeating_time = 100; / 100 ms between key repeats */
while ( game_running ) {
ProcessFrame();
while ( SDL_PollEvent(&event) ) {
if ( Event is Keypress ) {
keyrepeat_time = initial_time;
last_key = event.key.keysym;
last_pressed = SDL_GetTicks();
Handle Key(last_key);
} else {
Handle Event;
}
}
now = SDL_GetTicks();
if ( (now-last_pressed) > keyrepeat_time ) {
keyrepeat_time = repeating_time;
last_pressed = now;
Handle Key(last_key);
}
}
This code works pretty well.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
There is no keyrepeat on some OS’s, which is why there is no key repeat
in SDL. The method I outlined for simulating keyrepeat is platform
independent - it will work on Linux, Win32, BeOS, etc…
Hmm, so why can’t you use the keyrepeat from the OS if it is there and
use exactly the code you showed me if it isn’t… ?
Anyway, thanks a lot for your Code-Segment, I can nearly Cut-And-Paste
it directly into my Code
cu
Manuel
There is no keyrepeat on some OS’s, which is why there is no key repeat
in SDL. The method I outlined for simulating keyrepeat is platform
independent - it will work on Linux, Win32, BeOS, etc…
Hmm, so why can’t you use the keyrepeat from the OS if it is there and
use exactly the code you showed me if it isn’t… ?
Because the event loop knows nothing about key events.
I could add it, but I’d have to think about the best way to implement it,
and I have lots of other things to do now.
Anyway, thanks a lot for your Code-Segment, I can nearly Cut-And-Paste
it directly into my Code
No problem.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec