February 20, 2006
Chris wrote:

> I'm trying to use the SDL lib from your site but I get: Not a valid
> library file.

Actually I'm not sure if I put the DMC or the original Win lib there...
Murphy's states that whatever it is for, it's probably not yours :-)

However, the real deal should be available from http://www.libsdl.org/

--anders
February 20, 2006
Thanks,

I've tried the original .libs too they also cannot be recognized.

I cannot understand how to deal with .libs for now.

I've tried the version found here: http://shinh.skr.jp/d/porting.html and it works. Then there is a SDL_image.d file but no lib for it and I cannot make it link in any way.

I've opened the lib files (but not with a HEX editor) and I saw there is the following difference: the original have this at the beginning of the file:

!<arch>
/               1100558372              0       1248

The other one and the one I've tried to generate with lib.exe - don't, they have something like:

ð

I'm reading this:
http://www.digitalmars.com/d/interfaceToC.html
http://www.digitalmars.com/d/htomodule.html

And I still don't understand what to do ;).

Regards,

    Chris

> Actually I'm not sure if I put the DMC or the original Win lib there...
> Murphy's states that whatever it is for, it's probably not yours :-)
> 
> However, the real deal should be available from http://www.libsdl.org/
> 
> --anders
February 20, 2006
Sorry I forgot this:

Are lib files dependent of the platform? (I use Windows for now, later also I'll be try Linux too).
February 20, 2006
Chris wrote:

> Are lib files dependent of the platform? (I use Windows for now, later also I'll be try Linux too).

Yes, they depend on both the platform and the compiler...

Fortunately it is easier on Linux, since you can link to
the dynamic library directly and almost everyone uses GCC.

--anders
February 20, 2006
Chris wrote:

> I've tried the original .libs too they also cannot be recognized.

If you want to use them with DMC/DMD, you need to convert them first.

There should be a tool to do this for you:
ftp://ftp.digitalmars.com/coffimplib.zip

> I've tried the version found here: http://shinh.skr.jp/d/porting.html and it works. Then there is a SDL_image.d file but no lib for it and I cannot make it link in any way.

You need to convert the original library then, for use with DMC/DMD.
It can be found from here: http://www.libsdl.org/projects/SDL_image/

> I'm reading this:
> http://www.digitalmars.com/d/interfaceToC.html
> http://www.digitalmars.com/d/htomodule.html
> 
> And I still don't understand what to do ;).

That's OK, but please give your OS and D compiler next time...
http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/BugReports

--anders
February 20, 2006
Have you tried the derelict project on dsource.org? It is good for both linux and windows, it will load .dll and .so files at runtime so you don't have to mess with .lib formats.

Chris wrote:
> Thanks,
> 
> I've tried the original .libs too they also cannot be recognized.
> 
> I cannot understand how to deal with .libs for now.
> 
> I've tried the version found here: http://shinh.skr.jp/d/porting.html and it works. Then there is a SDL_image.d file but no lib for it and I cannot make it link in any way.
> 
> I've opened the lib files (but not with a HEX editor) and I saw there is the following difference: the original have this at the beginning of the file:
> 
> !<arch>
> /               1100558372              0       1248
> 
> The other one and the one I've tried to generate with lib.exe - don't, they have something like:
> 
> ð
> 
> I'm reading this:
> http://www.digitalmars.com/d/interfaceToC.html
> http://www.digitalmars.com/d/htomodule.html
> 
> And I still don't understand what to do ;).
> 
> Regards,
> 
>     Chris
> 
>> Actually I'm not sure if I put the DMC or the original Win lib there...
>> Murphy's states that whatever it is for, it's probably not yours :-)
>>
>> However, the real deal should be available from http://www.libsdl.org/
>>
>> --anders
February 20, 2006
> That's OK, but please give your OS and D compiler next time...
> http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/BugReports

Sorry, I usually forget to do it. As I said already: I currently use DMD on Windows. I have also installed Cygwin GDC but it requires the cygwin.dll so I prefer DMD for linux and I'm scared to compiles source files :) at least on Windows, so I haven't tryied to compile MingGW with  D support.

Later on, I'll try D on Linux but for now I want to start with D as soon as possible. I use Code::Blocks as na IDE and unfortunately I do not have much time to try out things.


I see you have converted the OpenGL headers, was it difficult are there any special cases?
For OpenGL I use GLEW (http://glew.sourceforge.net/) and I might try to convert it. That's why I'm asking.
February 20, 2006
Chris wrote:

> Sorry, I usually forget to do it. As I said already: I currently use DMD on Windows. I have also installed Cygwin GDC but it requires the cygwin.dll so I prefer DMD for linux and I'm scared to compiles source files :) at least on Windows, so I haven't tryied to compile MingGW with D support.

I'm dabbling with GDC under MinGW myself, will package it if I succeed

> I see you have converted the OpenGL headers, was it difficult are there any special cases?

Not too many, I have a perl script that did most of the translating.

> For OpenGL I use GLEW (http://glew.sourceforge.net/) and I might try to convert it. That's why I'm asking.

It said "C++" on the box, so it might be somewhat trickier. Try it :-)

--anders
February 20, 2006
Chris wrote:
> 
>> That's OK, but please give your OS and D compiler next time...
>> http://www.prowiki.org/wiki4d/wiki.cgi?D__Tutorial/BugReports
> 
> 
> Sorry, I usually forget to do it. As I said already: I currently use DMD on Windows. I have also installed Cygwin GDC but it requires the cygwin.dll so I prefer DMD for linux and I'm scared to compiles source files :) at least on Windows, so I haven't tryied to compile MingGW with  D support.
> 
> Later on, I'll try D on Linux but for now I want to start with D as soon as possible. I use Code::Blocks as na IDE and unfortunately I do not have much time to try out things.
> 
> 
> I see you have converted the OpenGL headers, was it difficult are there any special cases?
> For OpenGL I use GLEW (http://glew.sourceforge.net/) and I might try to convert it. That's why I'm asking

Don't know if it helps but http://glfw.sourceforge.net/ has import files for D.
February 20, 2006
> Don't know if it helps but http://glfw.sourceforge.net/ has import files for D.

Yes it's interesting but it doesn't seem to support OpenGL 2.0