Jump to page: 1 2
Thread overview
What's the difference between https://github.com/D-Programming-Deimos/glfw and https://github.com/DerelictOrg/DerelictGLFW3
Oct 19, 2014
Edn
Oct 19, 2014
Mike Parker
Oct 21, 2014
Edn
Oct 21, 2014
Edn
Oct 21, 2014
Szymon Gatner
Oct 21, 2014
Mike Parker
Oct 21, 2014
Mike Parker
Oct 21, 2014
Edn
Oct 21, 2014
Mike Parker
Oct 21, 2014
Edn
Oct 22, 2014
Mike Parker
Oct 22, 2014
Edn
Oct 22, 2014
Edn
Oct 23, 2014
Mike Parker
Oct 23, 2014
Mike Parker
October 19, 2014
Hello,

what's the difference between https://github.com/D-Programming-Deimos/glfw and https://github.com/DerelictOrg/DerelictGLFW3

thanks in advance
October 19, 2014
On 10/20/2014 4:11 AM, Edn wrote:
> Hello,
>
> what's the difference between
> https://github.com/D-Programming-Deimos/glfw and
> https://github.com/DerelictOrg/DerelictGLFW3
>
> thanks in advance

The bindings at Deimos have a link-time dependency on GLFW. Whether you want to link with the static library or link with the shared library, you need to with something when compiling your app. All of the bindings in Deimos are like this -- they are /static/ bindings.

The Derelict binding has no link-time dependency. You can build your app without having the development version of GLFW on your system. When the app is run, it searches the system path for the GLFW shared library and loads it into memory (you have to call DerelictGLFW3.load() for this to happen). All of the bindings in DerelictOrg are like this -- they are /dynamic/ bindings.

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

October 21, 2014
On Sunday, 19 October 2014 at 23:57:33 UTC, Mike Parker wrote:
> On 10/20/2014 4:11 AM, Edn wrote:
>> Hello,
>>
>> what's the difference between
>> https://github.com/D-Programming-Deimos/glfw and
>> https://github.com/DerelictOrg/DerelictGLFW3
>>
>> thanks in advance
>
> The bindings at Deimos have a link-time dependency on GLFW. Whether you want to link with the static library or link with the shared library, you need to with something when compiling your app. All of the bindings in Deimos are like this -- they are /static/ bindings.
>
> The Derelict binding has no link-time dependency. You can build your app without having the development version of GLFW on your system. When the app is run, it searches the system path for the GLFW shared library and loads it into memory (you have to call DerelictGLFW3.load() for this to happen). All of the bindings in DerelictOrg are like this -- they are /dynamic/ bindings.
>
> ---
> This email is free from viruses and malware because avast! Antivirus protection is active.
> http://www.avast.com

I'm trying to compile a simple program using D and GLFW. I heard that in order to use Deimos GLFW you will have to compile https://github.com/glfw/glfw using the digitalmars c++ compiler since dmd only supports OMF?
October 21, 2014
On Tuesday, 21 October 2014 at 06:41:12 UTC, Edn wrote:
> On Sunday, 19 October 2014 at 23:57:33 UTC, Mike Parker wrote:
>> On 10/20/2014 4:11 AM, Edn wrote:
>>> Hello,
>>>
>>> what's the difference between
>>> https://github.com/D-Programming-Deimos/glfw and
>>> https://github.com/DerelictOrg/DerelictGLFW3
>>>
>>> thanks in advance
>>
>> The bindings at Deimos have a link-time dependency on GLFW. Whether you want to link with the static library or link with the shared library, you need to with something when compiling your app. All of the bindings in Deimos are like this -- they are /static/ bindings.
>>
>> The Derelict binding has no link-time dependency. You can build your app without having the development version of GLFW on your system. When the app is run, it searches the system path for the GLFW shared library and loads it into memory (you have to call DerelictGLFW3.load() for this to happen). All of the bindings in DerelictOrg are like this -- they are /dynamic/ bindings.
>>
>> ---
>> This email is free from viruses and malware because avast! Antivirus protection is active.
>> http://www.avast.com
>
> I'm trying to compile a simple program using D and GLFW. I heard that in order to use Deimos GLFW you will have to compile https://github.com/glfw/glfw using the digitalmars c++ compiler since dmd only supports OMF?

I mean for the libraries
October 21, 2014
On Tuesday, 21 October 2014 at 06:42:17 UTC, Edn wrote:
> On Tuesday, 21 October 2014 at 06:41:12 UTC, Edn wrote:
>> On Sunday, 19 October 2014 at 23:57:33 UTC, Mike Parker wrote:
>>> On 10/20/2014 4:11 AM, Edn wrote:
>>>> Hello,
>>>>
>>>> what's the difference between
>>>> https://github.com/D-Programming-Deimos/glfw and
>>>> https://github.com/DerelictOrg/DerelictGLFW3
>>>>
>>>> thanks in advance
>>>
>>> The bindings at Deimos have a link-time dependency on GLFW. Whether you want to link with the static library or link with the shared library, you need to with something when compiling your app. All of the bindings in Deimos are like this -- they are /static/ bindings.
>>>
>>> The Derelict binding has no link-time dependency. You can build your app without having the development version of GLFW on your system. When the app is run, it searches the system path for the GLFW shared library and loads it into memory (you have to call DerelictGLFW3.load() for this to happen). All of the bindings in DerelictOrg are like this -- they are /dynamic/ bindings.
>>>
>>> ---
>>> This email is free from viruses and malware because avast! Antivirus protection is active.
>>> http://www.avast.com
>>
>> I'm trying to compile a simple program using D and GLFW. I heard that in order to use Deimos GLFW you will have to compile https://github.com/glfw/glfw using the digitalmars c++ compiler since dmd only supports OMF?
>
> I mean for the libraries

Is this your beginings with GLFW/OpengGL in D? If yes that I strongly sugest going with dub and Derelict. It all just works without any hustle.
October 21, 2014
On 10/21/2014 3:41 PM, Edn wrote:

> I'm trying to compile a simple program using D and GLFW. I heard that in
> order to use Deimos GLFW you will have to compile
> https://github.com/glfw/glfw using the digitalmars c++ compiler since
> dmd only supports OMF?

On Windows, when compiling as 32-bit, the compiler makes use of the OPTLINK linker that ships with it. OPTLINK only supports OMF. So you can compile a C library with dmc (which also uses OPTLINK) or you can take a library in COFF format and run it through an object converter (like coff2omf or Agner Fog's Object Converter[1]) to convert it to OMF.

When compiling with DMD as 64-bit, the compiler makes use of the Visual Studio toolchain, so you can use 64-bit COFF libraries out of the box after you install the VS tools.

If you are linking with the import library instead of a static library, the same idea applies. But in that case you can run a tool like coffimplib on the DLL to create an import library in OMF format, then link with it.

Both coff2omf and coffimplib are available, along with other useful utilities, as part of the Digital Mars Extended Utility Package [2] which is available for sale at [3].

This problem does not exist on Linux or Mac as DMD uses the GCC backend for those platforms.

[1] http://www.agner.org/optimize/#objconv
[2] http://www.digitalmars.com/eup.html
[3] http://www.digitalmars.com/shop.html

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

October 21, 2014
On 10/21/2014 6:38 PM, Mike Parker wrote:
> On 10/21/2014 3:41 PM, Edn wrote:
>
>> I'm trying to compile a simple program using D and GLFW. I heard that in
>> order to use Deimos GLFW you will have to compile
>> https://github.com/glfw/glfw using the digitalmars c++ compiler since
>> dmd only supports OMF?
>

And actually, I would second Szymon's recommendation to use dub and Derelict. It makes things much simpler.


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

October 21, 2014
On Tuesday, 21 October 2014 at 09:38:55 UTC, Mike Parker wrote:
> On 10/21/2014 3:41 PM, Edn wrote:
>
>> I'm trying to compile a simple program using D and GLFW. I heard that in
>> order to use Deimos GLFW you will have to compile
>> https://github.com/glfw/glfw using the digitalmars c++ compiler since
>> dmd only supports OMF?
>
> On Windows, when compiling as 32-bit, the compiler makes use of the OPTLINK linker that ships with it. OPTLINK only supports OMF. So you can compile a C library with dmc (which also uses OPTLINK) or you can take a library in COFF format and run it through an object converter (like coff2omf or Agner Fog's Object Converter[1]) to convert it to OMF.
>
> When compiling with DMD as 64-bit, the compiler makes use of the Visual Studio toolchain, so you can use 64-bit COFF libraries out of the box after you install the VS tools.
>
> If you are linking with the import library instead of a static library, the same idea applies. But in that case you can run a tool like coffimplib on the DLL to create an import library in OMF format, then link with it.
>
> Both coff2omf and coffimplib are available, along with other useful utilities, as part of the Digital Mars Extended Utility Package [2] which is available for sale at [3].
>
> This problem does not exist on Linux or Mac as DMD uses the GCC backend for those platforms.
>
> [1] http://www.agner.org/optimize/#objconv
> [2] http://www.digitalmars.com/eup.html
> [3] http://www.digitalmars.com/shop.html
>
> ---
> This email is free from viruses and malware because avast! Antivirus protection is active.
> http://www.avast.com

So if I compile DMD as x64 I can then use the libraries for VC120 that comes with the glfw windows binaries ? http://www.glfw.org/download.html
and then compile using :
dmd -d main.d glfw3.lib
October 21, 2014
On 10/21/2014 8:40 PM, Edn wrote:

>> http://www.avast.com
>
> So if I compile DMD as x64 I can then use the libraries for VC120 that
> comes with the glfw windows binaries ? http://www.glfw.org/download.html
> and then compile using :
> dmd -d main.d glfw3.lib

You will need to pass -m64 to get 64-bit compilation and will also need to compile and link the deimos glfw module. So assuming something like:

main.d
-deimos
--glfw
---glfw3.d

dmd -m64 main.d deimos/glfw/glfw3.d glfw.lib

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com

October 21, 2014
On Tuesday, 21 October 2014 at 15:42:39 UTC, Mike Parker wrote:
> On 10/21/2014 8:40 PM, Edn wrote:
>
>>> http://www.avast.com
>>
>> So if I compile DMD as x64 I can then use the libraries for VC120 that
>> comes with the glfw windows binaries ? http://www.glfw.org/download.html
>> and then compile using :
>> dmd -d main.d glfw3.lib
>
> You will need to pass -m64 to get 64-bit compilation and will also need to compile and link the deimos glfw module. So assuming something like:
>
> main.d
> -deimos
> --glfw
> ---glfw3.d
>
> dmd -m64 main.d deimos/glfw/glfw3.d glfw.lib
>
> ---
> This email is free from viruses and malware because avast! Antivirus protection is active.
> http://www.avast.com

Sorry, I'm very new to D.

Anyways, would
deimos/glfw/glfw3.d
be needed if I have
import glfw.glfw3;
in my main.d ?
« First   ‹ Prev
1 2