Closed Raith closed 10 years ago
Sry for the long delay. Compiler?
I sort of lost hope of getting a reply, thanks for getting back. I don't recall what delphi version was it back in may (XE4 or 5 most probably), but I've just tested it on XE6 and I got the same issue. I've contacted Kotai and it appears that he has fixed this on his end.
edit: what concerns differences between your headers and Kotai's, he is using PWideChar for IMG_Load(), TTF_RenderText_Solid() and such while you are using PAnsiChar, what's the deal with this?
Since SDL is using AnsiStrings I have to use PAnsiChar for every "*char" in the headers.
Alright, so I see. So Kotai's approach is just bad, although his headers are working fine (so far), then again I've already hit a bump with clipboard handling. After changing my code - pasting now semi-works. I guess it is time to switch to PAnsiChar.
Actually, the clipboard handling now works property, even though this is not the issue at hand, but you have helped, thanks a lot. I can't wait to switch to your headers after the real issue is resolved, since everything else compiles just fine if I comment out that one line with the Result. Sorry for being a nub and closing/reopening the issue.
I just uploaded the conversions for sdl_clipboard.h and sdl_cpuinfo.h. For the other issue i'm looking later today, since I'm a little bit busy actually.
EDIT: may you could test my clipboard headers?
@this issue: I really don't see, where there's an error. In my version all types are Int64 except the parameter "whence" - but this is in the SDL header defined as Int32.
Ah, I think i solved it now. The problem was, that Delphi XE5 was not in the jedi.inc - it should be fixed now for all further Delphiversions.
Sorry to be bearer of bad news but it's still complaining about incompatible types, I understand now what was missing and after adding manually for XE6 it's fine. But you still should review that part though because it does not work for future versions.
I am not gonna start a new issue, but something is fishy here too: procedure SDL_LogMessageV(category: Integer; priority: TSDL_LogPriority; const fmt: PAnsiChar; va_list ap);
Fixed - hopefully. Could you test it?
Yes I can and everything looks good now. Incompatible types still persists, I do not see any changes in jedi.inc and {$IF RTLVersion >= 26} does not seem to be working as a check for this. This is not a problem for me anymore anyway so it does not matter.
How do you fixed it?
The lazy but simple way, I just copy pasted everything from {ifdef ver240} and changed ver240 to ver270 since I am on XE6.
Mh. I'm looking for some way doing this compatible for all delphi versions.
this might be of interest if you want an elegant solution: http://stackoverflow.com/questions/23704097/how-to-define-version-and-up-ifdefs-in-delphi
tested and works for XE6/7. you needed to use 'CompilerVersion' instead of 'RTLVersion'.
function SDL_RWtell(ctx: PSDL_RWops): SInt64; begin Result := ctx^.seek(ctx, 0, RW_SEEK_CUR); end; [dcc32 Error] SDL2.pas(253): E2010 Incompatible types: 'Int64' and 'Integer'
same problem with Kotai's headers