Thread overview | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 26, 2005 d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Hi, I'm a complete linux newbie and have trouble getting glfw to work. Compiling simple d programs (hello world) is no problem. Compiling the glfw examples for C/C++ is no problem. But I cannot figure out how to compile a d program that uses glfw :( Here is my attempt at the makefile so far: DC = dmd DFLAGS = -debug -g IMPORTS = -I~/code/dtris/imports/ LIBS = ~/glfw-2.5/lib/x11/libglfw.a /usr/lib/libGLU.a /usr/lib/libGL.a /usr/lib/libX11.a /usr/lib/libm.a all: main.d $(DC) $(DFLAGS) $(IMPORTS) -ofsimple $(LIBS) But I get tons of errors: 1.a /usr/lib/libm.a -g -lphobos -lpthread -lm /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML': : undefined reference to `XF86VidModeQueryVersion' /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML': : undefined reference to `XF86VidModeGetModeLine' /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay': : undefined reference to `XextFindDisplay' /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay': : undefined reference to `XextAddDisplay' /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay': : undefined reference to `XextCreateExtension' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmUnmap' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmUnmap' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmClose' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmOpen' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmGetMagic' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmGetVersion' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmFreeVersion' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmMap' /usr/lib/libGL.a(glxext.o): In function `__glXInitialize': : undefined reference to `drmMap' /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay': : undefined reference to `XextRemoveDisplay' /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay': : undefined reference to `XextRemoveDisplay' /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver': : undefined reference to `dlopen' /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver': : undefined reference to `dlerror' /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver': : undefined reference to `dlsym' /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver': : undefined reference to `dlclose' /usr/lib/libGL.a(dri_glx.o): In function `glXGetDriverConfig': : undefined reference to `dlsym' /usr/lib/libGL.a(dri_glx.o): In function `driDestroyDisplay': : undefined reference to `dlclose' /usr/lib/libGL.a(XF86dri.o): In function `find_display': : undefined reference to `XextFindDisplay' /usr/lib/libGL.a(XF86dri.o): In function `find_display': : undefined reference to `XextAddDisplay' /usr/lib/libGL.a(XF86dri.o): In function `find_display': : undefined reference to `XextCreateExtension' /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryVersion': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryDirectRenderingCapable': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIOpenConnection': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIAuthConnection': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(XF86dri.o): In function `XF86DRICloseConnection': : undefined reference to `XMissingExtension' /usr/lib/libGL.a(XF86dri.o):: more undefined references to `XMissingExtension' follow /usr/lib/libGL.a(XF86dri.o): In function `close_display': : undefined reference to `XextRemoveDisplay' /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay': : undefined reference to `XauDisposeAuth' /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay': : undefined reference to `XauGetBestAuthByAddr' /usr/lib/libX11.a(CrGlCur.o): In function `open_library': : undefined reference to `dlopen' /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': : undefined reference to `dlsym' /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': : undefined reference to `dlsym' /usr/lib/libX11.a(XlcDL.o): In function `open_object': : undefined reference to `dlopen' /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol': : undefined reference to `dlsym' /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol': : undefined reference to `dlsym' /usr/lib/libX11.a(XlcDL.o): In function `close_object': : undefined reference to `dlclose' collect2: ld gab 1 als Ende-Status zurück --- errorlevel 1 make: *** [all] Fehler 1 It already took me hours and hours of reading manuals and copy/paste from other makefiles, but no luck. It's very frustrating. If anybody could help I would really appreciate it! |
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | Hannes wrote:
> Hi,
>
> I'm a complete linux newbie and have trouble getting glfw to work.
> Compiling simple d programs (hello world) is no problem.
> Compiling the glfw examples for C/C++ is no problem.
> But I cannot figure out how to compile a d program that uses glfw :(
>
> Here is my attempt at the makefile so far:
>
>
>
> DC = dmd
> DFLAGS = -debug -g
> IMPORTS = -I~/code/dtris/imports/
> LIBS = ~/glfw-2.5/lib/x11/libglfw.a /usr/lib/libGLU.a /usr/lib/libGL.a
> /usr/lib/libX11.a /usr/lib/libm.a
>
> all: main.d
> $(DC) $(DFLAGS) $(IMPORTS) -ofsimple $(LIBS)
>
>
>
> But I get tons of errors:
>
> 1.a /usr/lib/libm.a -g -lphobos -lpthread -lm
> /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML':
> : undefined reference to `XF86VidModeQueryVersion'
> /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML':
> : undefined reference to `XF86VidModeGetModeLine'
> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
> : undefined reference to `XextFindDisplay'
> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
> : undefined reference to `XextAddDisplay'
> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
> : undefined reference to `XextCreateExtension'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmUnmap'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmUnmap'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmClose'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmOpen'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmGetMagic'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmGetVersion'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmFreeVersion'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmMap'
> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
> : undefined reference to `drmMap'
> /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay':
> : undefined reference to `XextRemoveDisplay'
> /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay':
> : undefined reference to `XextRemoveDisplay'
> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
> : undefined reference to `dlopen'
> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
> : undefined reference to `dlerror'
> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
> : undefined reference to `dlsym'
> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
> : undefined reference to `dlclose'
> /usr/lib/libGL.a(dri_glx.o): In function `glXGetDriverConfig':
> : undefined reference to `dlsym'
> /usr/lib/libGL.a(dri_glx.o): In function `driDestroyDisplay':
> : undefined reference to `dlclose'
> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
> : undefined reference to `XextFindDisplay'
> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
> : undefined reference to `XextAddDisplay'
> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
> : undefined reference to `XextCreateExtension'
> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryVersion':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryDirectRenderingCapable':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIOpenConnection':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIAuthConnection':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRICloseConnection':
> : undefined reference to `XMissingExtension'
> /usr/lib/libGL.a(XF86dri.o):: more undefined references to `XMissingExtension'
> follow
> /usr/lib/libGL.a(XF86dri.o): In function `close_display':
> : undefined reference to `XextRemoveDisplay'
> /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':
> : undefined reference to `XauDisposeAuth'
> /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':
> : undefined reference to `XauGetBestAuthByAddr'
> /usr/lib/libX11.a(CrGlCur.o): In function `open_library':
> : undefined reference to `dlopen'
> /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
> : undefined reference to `dlsym'
> /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
> : undefined reference to `dlsym'
> /usr/lib/libX11.a(XlcDL.o): In function `open_object':
> : undefined reference to `dlopen'
> /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol':
> : undefined reference to `dlsym'
> /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol':
> : undefined reference to `dlsym'
> /usr/lib/libX11.a(XlcDL.o): In function `close_object':
> : undefined reference to `dlclose'
> collect2: ld gab 1 als Ende-Status zurück
> --- errorlevel 1
> make: *** [all] Fehler 1
>
>
>
> It already took me hours and hours of reading manuals and copy/paste from other
> makefiles, but no luck. It's very frustrating. If anybody could help I would
> really appreciate it!
>
>
Add -L-ldl and -L-lXext to your library flags, then post what you have left. Those are the only two I can tell you need by looking at it.
|
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | clayasaurus wrote:
> Hannes wrote:
>
>> Hi,
>>
>> I'm a complete linux newbie and have trouble getting glfw to work.
>> Compiling simple d programs (hello world) is no problem.
>> Compiling the glfw examples for C/C++ is no problem.
>> But I cannot figure out how to compile a d program that uses glfw :(
>>
>> Here is my attempt at the makefile so far:
>>
>>
>>
>> DC = dmd
>> DFLAGS = -debug -g
>> IMPORTS = -I~/code/dtris/imports/
>> LIBS = ~/glfw-2.5/lib/x11/libglfw.a /usr/lib/libGLU.a /usr/lib/libGL.a
>> /usr/lib/libX11.a /usr/lib/libm.a
>>
>> all: main.d
>> $(DC) $(DFLAGS) $(IMPORTS) -ofsimple $(LIBS)
>>
>>
>>
>> But I get tons of errors:
>>
>> 1.a /usr/lib/libm.a -g -lphobos -lpthread -lm
>> /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML':
>> : undefined reference to `XF86VidModeQueryVersion'
>> /usr/lib/libGL.a(glxcmds.o): In function `glXGetMscRateOML':
>> : undefined reference to `XF86VidModeGetModeLine'
>> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
>> : undefined reference to `XextFindDisplay'
>> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
>> : undefined reference to `XextAddDisplay'
>> /usr/lib/libGL.a(glxext.o): In function `__glXFindDisplay':
>> : undefined reference to `XextCreateExtension'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmUnmap'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmUnmap'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmClose'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmOpen'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmGetMagic'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmGetVersion'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmFreeVersion'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmMap'
>> /usr/lib/libGL.a(glxext.o): In function `__glXInitialize':
>> : undefined reference to `drmMap'
>> /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay':
>> : undefined reference to `XextRemoveDisplay'
>> /usr/lib/libGL.a(glxext.o): In function `__glXCloseDisplay':
>> : undefined reference to `XextRemoveDisplay'
>> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
>> : undefined reference to `dlopen'
>> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
>> : undefined reference to `dlerror'
>> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
>> : undefined reference to `dlsym'
>> /usr/lib/libGL.a(dri_glx.o): In function `OpenDriver':
>> : undefined reference to `dlclose'
>> /usr/lib/libGL.a(dri_glx.o): In function `glXGetDriverConfig':
>> : undefined reference to `dlsym'
>> /usr/lib/libGL.a(dri_glx.o): In function `driDestroyDisplay':
>> : undefined reference to `dlclose'
>> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
>> : undefined reference to `XextFindDisplay'
>> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
>> : undefined reference to `XextAddDisplay'
>> /usr/lib/libGL.a(XF86dri.o): In function `find_display':
>> : undefined reference to `XextCreateExtension'
>> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryVersion':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIQueryDirectRenderingCapable':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIOpenConnection':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRIAuthConnection':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(XF86dri.o): In function `XF86DRICloseConnection':
>> : undefined reference to `XMissingExtension'
>> /usr/lib/libGL.a(XF86dri.o):: more undefined references to `XMissingExtension'
>> follow
>> /usr/lib/libGL.a(XF86dri.o): In function `close_display':
>> : undefined reference to `XextRemoveDisplay'
>> /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':
>> : undefined reference to `XauDisposeAuth'
>> /usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':
>> : undefined reference to `XauGetBestAuthByAddr'
>> /usr/lib/libX11.a(CrGlCur.o): In function `open_library':
>> : undefined reference to `dlopen'
>> /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
>> : undefined reference to `dlsym'
>> /usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol':
>> : undefined reference to `dlsym'
>> /usr/lib/libX11.a(XlcDL.o): In function `open_object':
>> : undefined reference to `dlopen'
>> /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol':
>> : undefined reference to `dlsym'
>> /usr/lib/libX11.a(XlcDL.o): In function `fetch_symbol':
>> : undefined reference to `dlsym'
>> /usr/lib/libX11.a(XlcDL.o): In function `close_object':
>> : undefined reference to `dlclose'
>> collect2: ld gab 1 als Ende-Status zurück
>> --- errorlevel 1
>> make: *** [all] Fehler 1
>>
>>
>>
>> It already took me hours and hours of reading manuals and copy/paste from other
>> makefiles, but no luck. It's very frustrating. If anybody could help I would
>> really appreciate it!
>>
>>
>
> Add -L-ldl and -L-lXext to your library flags, then post what you have left. Those are the only two I can tell you need by looking at it.
Add -L-lXxf86vm as well.
|
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | In article <djonir$31kn$1@digitaldaemon.com>, clayasaurus says... >> Add -L-ldl and -L-lXext to your library flags >Add -L-lXxf86vm as well. libdl was no problem, but I neither have libXext nor libXxf86vm. However I do have these files: /usr/lib/libXext.so.6.4.1 /usr/lib/libXext.so.6 /usr/lib/libXxf86vm.so.1.0.0 /usr/lib/libXxf86vm.so.1 But the linker did not like any of these. They seem to be different from normal libraries... what can I do? TIA |
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | Hannes wrote:
> In article <djonir$31kn$1@digitaldaemon.com>, clayasaurus says...
>
>
>>>Add -L-ldl and -L-lXext to your library flags
>>
>>Add -L-lXxf86vm as well.
>
> libdl was no problem, but I neither have libXext nor libXxf86vm.
> However I do have these files:
>
> /usr/lib/libXext.so.6.4.1
> /usr/lib/libXext.so.6
> /usr/lib/libXxf86vm.so.1.0.0
> /usr/lib/libXxf86vm.so.1
>
> But the linker did not like any of these. They seem to be different from normal
> libraries... what can I do?
>
> TIA
>
>
run 'ldconfig' from the command line and try again?
|
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to clayasaurus | Turned out I did not need those two libraries. My makefile now looks like this: DC = dmd DFLAGS = -debug -g IMPORTS = -I~/code/dtris/imports/ LIBS = -L-lglfw -L-lGLU -L-lGL -L-lX11 -L-lm -L-ldl all: list.d slice.d piece.d moving.d board.d tetris.d main.d $(DC) $(DFLAGS) $(IMPORTS) -oftetris list.d slice.d piece.d moving.d board.d tetris.d main.d $(LIBS) (Yeah, theres a lot more files, I simplified the previous examples). ..AND IT WORKS! This is like multiple orgasms (although guys normally don't have them, but with D anything's possible!) Now my next question is, how can I simply the makefile - the list of filenames appear twice, surely there's some way to avoid that...? And I often see makefiles where every file is treated seperately. I guess this is not possible with D? |
October 26, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | You can download my first successful linux/D/GLFW compile at: http://www.geocities.com/ackehurst/index.html I'd be glad to hear if it runs on other linux machines than mine. THX! |
October 27, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | Hannes wrote: > Turned out I did not need those two libraries. My makefile now looks like this: > > > > DC = dmd > DFLAGS = -debug -g > IMPORTS = -I~/code/dtris/imports/ > LIBS = -L-lglfw -L-lGLU -L-lGL -L-lX11 -L-lm -L-ldl > > all: list.d slice.d piece.d moving.d board.d tetris.d main.d > $(DC) $(DFLAGS) $(IMPORTS) -oftetris list.d slice.d piece.d moving.d board.d > tetris.d main.d $(LIBS) > > > > (Yeah, theres a lot more files, I simplified the previous examples). > > ..AND IT WORKS! This is like multiple orgasms (although guys normally don't > have them, but with D anything's possible!) > > Now my next question is, how can I simply the makefile - the list of filenames > appear twice, surely there's some way to avoid that...? > > And I often see makefiles where every file is treated seperately. I guess this > is not possible with D? > > There's something else about D that you'll come to love. It is called build. http://www.dsource.org/projects/build/ "Build is designed to simplify the process of compiling a D application. It removes the need for tools like make and Scons, in that it analyzes the source code to work out source file dependancies, and then determines which of the dependant files need recompiling and linking. It can build either executables or libraries." Download the current source from that site and run 'make -f Makefile.unix' (or whatever the linux makefile is called) to build build. To use build to compile your application, just type ./build main.d -L-lglfw -L-lGLU -L-lGL -L-lX11 -L-lm -L-ldl -debug -g -I~/code/dtris/imports/ I usually put this command in an .sh/.bat script file so I just type ./compile and it builds my project. Or you could read the docs about .brf files if that suits you better. ( http://svn.dsource.org/projects/build/trunk/Docs/RESPONSE_FILE.htm#RESPONSE_FILE ) Build will figure out all the other files you need and pass them to the dmd command line. Have fun. ~ Clay |
October 27, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | Hannes wrote:
> You can download my first successful linux/D/GLFW compile at:
> http://www.geocities.com/ackehurst/index.html
>
> I'd be glad to hear if it runs on other linux machines than mine. THX!
>
>
Runs on my Kubuntu Badger.
|
October 27, 2005 Re: d with glfw under linux | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hannes | In article <djob97$2lc2$1@digitaldaemon.com>, Hannes says... > >Hi, > >I'm a complete linux newbie and have trouble getting glfw to work. >Compiling simple d programs (hello world) is no problem. >Compiling the glfw examples for C/C++ is no problem. >But I cannot figure out how to compile a d program that uses glfw :( > Mike Parker's Derelict supports using glfw through a shared library on Linux. Unfortunately, the developer of glfw itself still does not provide a linux shared library version of glfw, despite frequent requests being made for such. There is a way to create a shared library version of glfw on linux. If done, this makes it tremendously easy to use the library with linux. You don't have to worry about including any of the X link libraries on the command line because the dynamic loader takes care of loading these libraries for you as soon as libglfw.so is loaded. I believe instructions are included with the Derelict glfw distribution, (available on dsource.org) for compiling glfw into a shared library version for linux. I've built and used this shared library version of glfw successfully using derelict. -JJR |
Copyright © 1999-2021 by the D Language Foundation