Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: SDL2.0 Dev

123 views
Skip to first unread message

Tobias Leich

unread,
Feb 28, 2013, 1:20:10 AM2/28/13
to Kartik Thakore, sdl-...@perl.org
I'm using VC2010 Express or so... But I can give it a try to compile
libSDL2.

Am 28.02.2013 02:09, schrieb Kartik Thakore:
> Hey Froggs,
>
> I am in windows lappy lately :(. How do you compile SDL1.2 and can you
> compile SDL2.0 for strawberry perl?

Kartik Thakore

unread,
Feb 27, 2013, 8:09:28 PM2/27/13
to sdl-...@perl.org, Tobias Leich

Kartik Thakore

unread,
Feb 28, 2013, 2:52:43 PM2/28/13
to Tobias Leich, sdl-...@perl.org
How do I set that up? I opened it in vs2013 and it kept complaining
about missing directx headers. But when I google it, msdn says that
directx is part of vs2013 since vs2008. So fucking weird.

Kartik Thakore

kmx

unread,
Feb 28, 2013, 4:04:04 PM2/28/13
to sdl-...@perl.org
Hi Kartik,

Check these:
http://strawberryperl.com/package/kmx/sdl/32bit_SDL-2.0.0-6921_20130228.zip
http://strawberryperl.com/package/kmx/sdl/64bit_SDL-2.0.0-6921_20130228.zip

(just unpack them into c:\strawberry)

If you decide to go for Alien:SDL2 I just want you to know that I am ready :)

It is quite a long time since I was hacking on Alien::SDL

--
kmx

Tobias Leich

unread,
Feb 28, 2013, 4:06:47 PM2/28/13
to sdl-...@perl.org, kmx
Hi kmx!

The decision to make Alien::SDL2 was already made :o)

So, feel free to create a new repository. I can do the linux/BSD-magic
then...

Cheers, Tobias

Tobias Leich

unread,
Feb 28, 2013, 4:07:25 PM2/28/13
to sdl-...@perl.org
Thats not true, you still need to download and install the diectx sdk.

Kartik Thakore

unread,
Feb 28, 2013, 4:09:04 PM2/28/13
to Tobias Leich, sdl-...@perl.org
fucking liars

Kartik Thakore

unread,
Feb 28, 2013, 4:09:46 PM2/28/13
to kmx, sdl-...@perl.org
AWESOME. I would love your help on Alien::SDL2. Can you document your
process somewhere for how you do the build on windows?


On Thu, Feb 28, 2013 at 4:04 PM, kmx <k...@volny.cz> wrote:

>
> On 28.2.2013 2:09, Kartik Thakore wrote:
>
>> Hey Froggs,
>>
>> I am in windows lappy lately :(. How do you compile SDL1.2 and can you
>> compile SDL2.0 for strawberry perl?
>>
>
> Hi Kartik,
>
> Check these:
> http://strawberryperl.com/**package/kmx/sdl/32bit_SDL-2.0.**
> 0-6921_20130228.zip<http://strawberryperl.com/package/kmx/sdl/32bit_SDL-2.0.0-6921_20130228.zip>
> http://strawberryperl.com/**package/kmx/sdl/64bit_SDL-2.0.**
> 0-6921_20130228.zip<http://strawberryperl.com/package/kmx/sdl/64bit_SDL-2.0.0-6921_20130228.zip>

kmx

unread,
Feb 28, 2013, 4:22:40 PM2/28/13
to sdl-...@perl.org
Hi Kartik & Tobias,

1/ as for building strawberry perl binaries:
- I use MSYS shell + gcc included in straberry perl
- it builds fine without any patching simply by running: ./configure && make

it seems like DirectX headers included in strawberry's gcc (I am using the
latest 5.16.2) play well with SDL2
checking d3d9.h usability... yes
checking d3d9.h presence... yes
checking for d3d9.h... yes
checking ddraw.h usability... yes
checking ddraw.h presence... yes
checking for ddraw.h... yes
checking dsound.h usability... yes
checking dsound.h presence... yes
checking for dsound.h... yes
checking dinput.h usability... yes
checking dinput.h presence... yes
checking for dinput.h... yes

2/ as for Alien::SDL2
what libraries do we want to include?
how does SLD2 work with SDL_gfx, SDL_mixer, ... ? are they still needed?
what I want to avoid (if possible) is SDL_Pango (huge GTK dependency chain)

--
kmx

Kartik Thakore

unread,
Feb 28, 2013, 5:23:57 PM2/28/13
to kmx, sdl-...@perl.org
I couldn't do ./configure in the portable strawberry perl .bat file shell.
What shell do you use?

Alien::SDL2 will just have SDL2 for now. The other libraries don't work
with SDL2 as of yet.

kmx

unread,
Feb 28, 2013, 5:58:16 PM2/28/13
to Kartik Thakore, sdl-...@perl.org

On 28.2.2013 23:23, Kartik Thakore wrote:
> I couldn't do ./configure in the portable strawberry perl .bat file
> shell. What shell do you use?

MSYS - you can get it from
http://sourceforge.net/projects/perlmingw/files/MSYS%20Environment%20for%20End%20Users/

>
> Alien::SDL2 will just have SDL2 for now. The other libraries don't work
> with SDL2 as of yet.

OK, could you create a repo like https://github.com/PerlGameDev/Alien-SDL2 ?

--
kmx

kmx

unread,
Feb 28, 2013, 6:29:30 PM2/28/13
to sdl-...@perl.org

>>
>> Alien::SDL2 will just have SDL2 for now. The other libraries don't work
>> with SDL2 as of yet.
>
> OK, could you create a repo like https://github.com/PerlGameDev/Alien-SDL2 ?

In fact some of SDL_xxx libraries seem to support SDL2

I have exported latest trunk versions of these libs from their
Mercurial/SVN repos, you can get the tarballs from
http://strawberryperl.com/package/kmx/sdl/src/

--
kmx

kmx

unread,
Feb 28, 2013, 7:59:20 PM2/28/13
to sdl-...@perl.org

> Alien::SDL2 will just have SDL2 for now. The other libraries don't work
> with SDL2 as of yet.


It is better than you might expect - in fact all of them work with SDL2

All these (latest SNV/Mercurial exports) tarballs build without any troubles:
SDL2-hg20130301.tar.gz
SDL2_gfx-svn20130301.tar.gz
SDL2_image-hg20130301.tar.gz
SDL2_mixer-hg20130301.tar.gz
SDL2_net-hg20130301.tar.gz
SDL2_sound-hg20130301.tar.gz
SDL2_ttf-hg20130301.tar.gz

You can get them from http://strawberryperl.com/package/kmx/sdl/src/

--
kmx

Kartik Thakore

unread,
Feb 28, 2013, 10:10:23 PM2/28/13
to kmx, sdl-...@perl.org
Creating now



On Thu, Feb 28, 2013 at 5:58 PM, kmx <k...@volny.cz> wrote:

>
> On 28.2.2013 23:23, Kartik Thakore wrote:
>
>> I couldn't do ./configure in the portable strawberry perl .bat file
>> shell. What shell do you use?
>>
>
> MSYS - you can get it from http://sourceforge.net/**
> projects/perlmingw/files/MSYS%**20Environment%20for%20End%**20Users/<http://sourceforge.net/projects/perlmingw/files/MSYS%20Environment%20for%20End%20Users/>
>
>
>
>> Alien::SDL2 will just have SDL2 for now. The other libraries don't work
>> with SDL2 as of yet.
>>
>
> OK, could you create a repo like https://github.com/**
> PerlGameDev/Alien-SDL2 <https://github.com/PerlGameDev/Alien-SDL2> ?
>
> --
> kmx
>

Kartik Thakore

unread,
Feb 28, 2013, 10:12:38 PM2/28/13
to kmx, sdl-...@perl.org
Done https://github.com/PerlGameDev/Alien-SDL2


On Thu, Feb 28, 2013 at 10:10 PM, Kartik Thakore
<thakore...@gmail.com>wrote:

Kartik Thakore

unread,
Feb 28, 2013, 11:10:38 PM2/28/13
to kmx, sdl-...@perl.org
So was trying to compile stuff this is what I get running. perl Build.pl
and perl Build in https://github.com/PerlGameDev/SDL2

I copied your libSDL2 zip files to strawberryperl/c

g++.exe -o "blib\arch\auto\SDL2\SDL2.dll" -Wl,--base-file,"lib\SDL2.base"
-Wl,--
image-base,0x7d200000 -mdll -s
-L"C:\Users\kthakore\Documents\Development\strawb
erry_perl\perl\lib\CORE"
-L"C:\Users\kthakore\Documents\Development\strawberry_p
erl\c\lib" "lib\SDL2.lds"
-LC:\Users\kthakore\Documents\Development\strawberry_p
erl\c\bin\..\lib -lmingw32 -lSDL2main -lSDL2 -mwindows "lib\SDL2.exp"
lib\SDL2.o:SDL2.c:(.text+0x5e): undefined reference to `get_handle_win32'
lib\SDL2.o:SDL2.c:(.text+0x4d7): undefined reference to
`windows_force_driver'
collect2: ld returned 1 exit status
dlltool --def "lib\SDL2.def" --output-exp "lib\SDL2.exp" --base-file
"lib\SDL2.b
ase"
> You can get them from http://strawberryperl.com/**package/kmx/sdl/src/<http://strawberryperl.com/package/kmx/sdl/src/>
>
> --
> kmx
>

kmx

unread,
Mar 1, 2013, 5:32:14 AM3/1/13
to sdl-...@perl.org

On 1.3.2013 5:10, Kartik Thakore wrote:
> So was trying to compile stuff this is what I get running. perl Build.pl
> and perl Build in https://github.com/PerlGameDev/SDL2
>
> I copied your libSDL2 zip files to strawberryperl/c
>
> g++.exe -o "blib\arch\auto\SDL2\SDL2.dll" -Wl,--base-file,"lib\SDL2.base"
> -Wl,--
> image-base,0x7d200000 -mdll -s
> -L"C:\Users\kthakore\Documents\Development\strawb
> erry_perl\perl\lib\CORE"
> -L"C:\Users\kthakore\Documents\Development\strawberry_p
> erl\c\lib" "lib\SDL2.lds"
> -LC:\Users\kthakore\Documents\Development\strawberry_p
> erl\c\bin\..\lib -lmingw32 -lSDL2main -lSDL2 -mwindows "lib\SDL2.exp"
> lib\SDL2.o:SDL2.c:(.text+0x5e): undefined reference to `get_handle_win32'
> lib\SDL2.o:SDL2.c:(.text+0x4d7): undefined reference to
> `windows_force_driver'
> collect2: ld returned 1 exit status
> dlltool --def "lib\SDL2.def" --output-exp "lib\SDL2.exp" --base-file
> "lib\SDL2.base"

I have no idea what should functions get_handle_win32 + windows_force_driver exactly do. These are not part of SDL2.

Simply comment them out.

--
kmx


kmx

unread,
Mar 1, 2013, 5:35:55 AM3/1/13
to sdl-...@perl.org

On 1.3.2013 5:34, Kartik Thakore wrote:
> And then this.


Well it a collision of SDL2.dll (which comes from SDL2 binaries) vs.
SDL2.dll which is the output of compiling SDL2.xs

Grrr, somebody should propose a fix to p5p to produce something like
SDL2.xs.dll

Anyway I can prepare new binaries with renamed DLL's (will do over the
weekend) or you can move your XS testing to e.g. SDL2::TestOnly module
(which will produce TestOnly.dll not SDL2.dll)

--
kmx

Kartik Thakore

unread,
Mar 1, 2013, 7:19:47 AM3/1/13
to kmx, sdl-...@perl.org
Check out the new branch. I am doing SDL2pp.dll for the collision.
get_handle_win32 and junk comes from windows.h I believe but SDL2 has no
need for it. https://github.com/PerlGameDev/SDL2/tree/new_sdl_win

Jeffrey Palmer

unread,
Mar 1, 2013, 8:01:59 AM3/1/13
to kmx, sdl-devel
sdl-team has been added to SDL2, that should fix that.

--
Jeff

On Fri, Mar 1, 2013 at 6:46 AM, kmx <k...@volny.cz> wrote:

>
> On 1.3.2013 1:08, Jeffrey Palmer wrote:
>
>> I went ahead and created that repo on github. Let me know if there's
>> anything I can do to help.
>>
>
> Thanks, could you please also give me a commit privilege to PerlGameDev /
> SDL2 ?
>
> --
> kmx
>
>

kmx

unread,
Mar 1, 2013, 11:34:16 AM3/1/13
to sdl-...@perl.org
Updated SDL2 binaries for strawberry perl:
* http://strawberryperl.com/package/kmx/sdl/32bit_SDL2_20130301.zip
* http://strawberryperl.com/package/kmx/sdl/64bit_SDL2_20130301.zip

Contain:
* SDL2
* SDL2_image
* SDL2_gfx
* SDL2_net
* SDL2_mixer
* SDL2_ttf
(all from latest SVN/Mercurial checkouts)

--
kmx

Kartik Thakore

unread,
Mar 1, 2013, 11:43:55 AM3/1/13
to kmx, sdl-...@perl.org

kmx

unread,
Mar 3, 2013, 4:43:11 PM3/3/13
to sdl-...@perl.org
I have cloned the good old Alien::SDL into
https://github.com/PerlGameDev/Alien-SDL2

Nearly all patches + some parts that I considered conected to SDL-1.x were
removed but overall idea + interface style is the same.

I have tested only on strawberry perl (pre-built binaries) and one of my
Linux box (building from source), so it is far from release quality.

--
kmx

Kartik Thakore

unread,
Mar 3, 2013, 6:16:13 PM3/3/13
to kmx, sdl-...@perl.org
Thanks. In SDL2 I had to neuter your internal::Loader stuff. I didn't know
what was it doing. I will have SDL2 use the Alien::SDL2 in a bit too.


On Sun, Mar 3, 2013 at 4:43 PM, kmx <k...@volny.cz> wrote:

> I have cloned the good old Alien::SDL into https://github.com/**
> PerlGameDev/Alien-SDL2 <https://github.com/PerlGameDev/Alien-SDL2>

kmx

unread,
Mar 4, 2013, 4:58:14 AM3/4/13
to sdl-...@perl.org

On 4.3.2013 0:16, Kartik Thakore wrote:
> Thanks. In SDL2 I had to neuter your internal::Loader stuff. I didn't know
> what was it doing. I will have SDL2 use the Alien::SDL2 in a bit too.

SDL2::Internal::Loader::internal_load_dlls will be needed as Alien::SDL2
keeps dynamic libraries (dll, so) in a place where operating system is not
gonna search for them.

If you use strawberry perl SDL2 binaries directly unzipped into
c:\strawberry then you do not need SDL2::Internal::Loader (as all SDL2
related DLL's are in your PATH). But if you install SDL2 binaries via
Alien::SDL2 then 'internal_load_dlls' (or alternative hack) is necessary.

--
kmx
0 new messages