SFML community forums

Bindings - other languages => D => Topic started by: Jebbs on December 20, 2013, 09:05:45 am

Title: DSFML-C "Nightlies"
Post by: Jebbs on December 20, 2013, 09:05:45 am
Here are The most recent builds for DSFML-C, with the exception of the 2.0 binaries. I'll be uploading those soon, but for now the most up to date code should be just fine.

*Current*

 Windows 32bit  (http://jebbs.github.io/DSFML/bins/windows/DSFML-Current-Win32.zip) - August 8th, 2014
 Windows 64bit  (http://jebbs.github.io/DSFML/bins/windows/DSFML-Curent-Win64.zip) - August 6th, 2014

 Linux 32bit  (http://jebbs.github.io/DSFML/bins/linux/DSFML-Current-Linux32.zip) - July 30th, 2014
 Linux 64bit  (http://jebbs.github.io/DSFML/bins/linux/DSFML-Current-Linux64.zip) - Auguest 2nd, 2014

 OSX  (http://jebbs.github.io/DSFML/bins/osx/DSFML-Current-OSX.zip) - August 2nd, 2014


*2.0*


Windows 32bit (https://dl.dropboxusercontent.com/u/167365084/DSFML%20for%20Windows.zip) - Compiled December 19th, 2013

Windows 64bit - Coming 2014(Unless someone else wants to build them for me)

Linux 32bit (https://dl.dropboxusercontent.com/u/167365084/DSFML%20for%20Linux%2032bit.zip) - Compiled December 28th, 2013 on Mint

Linux 64bit (https://dl.dropboxusercontent.com/u/167365084/DSFML%20for%20Linux.zip) - Compiled December 19th, 2013 on Mint

OS X (https://dl.dropboxusercontent.com/u/167365084/DSFML%20for%20OSX.zip) - Compiled November 11th, 2013 by someone else. Haven't been tested by me.
Title: Re: DSFML-C "Nightlies"
Post by: dmoore764 on December 21, 2013, 08:23:23 pm
You should mention in the tutorial that you need to install DMD from dlang.org first.  Maybe it's obvious to most people, but I didn't realize that installing dub wasn't enough.

Also, once I got it to compile, it gives an error "The program can't start because dsfml-graphics-2.dll is missing from your computer.  Try reinstalling the program to fix this problem."

I don't know where it could be looking for the dll's other than the folder that I initially specified in the package.json...?
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 21, 2013, 09:50:44 pm
You should mention in the tutorial that you need to install DMD from dlang.org first.  Maybe it's obvious to most people, but I didn't realize that installing dub wasn't enough.

Ah, yes. You are right. It was mentioned in the original tutorial, but looks like it was left out when I split them up into parts. I'll fix this, thanks.


Quote
Also, once I got it to compile, it gives an error "The program can't start because dsfml-graphics-2.dll is missing from your computer.  Try reinstalling the program to fix this problem."

I don't know where it could be looking for the dll's other than the folder that I initially specified in the package.json...?

This was mentioned in the tutorial, but I can clarify it a little bit. When you go to run the program, the dll's need to either be in a location that is in the PATH, or in the same directory and the exe.
Title: Re: DSFML-C "Nightlies"
Post by: dmoore764 on December 21, 2013, 11:03:01 pm
Sweet!  Works great now.  Can't wait to give this a shot.  Thanks for your hard work!
Title: Re: DSFML-C "Nightlies"
Post by: malkierian on December 23, 2013, 01:16:51 am
Also, for those who were used to building things in the past, is this download that is now linked to everywhere everything we need to get DSFML working on our system?  I.E. this has DSFML and DSFML-C all wrapped up and we don't need to build DSFML on these seemingly DSFML-C files?
Title: Re: DSFML-C "Nightlies"
Post by: dmoore764 on December 23, 2013, 07:20:16 am
Also, for those who were used to building things in the past, is this download that is now linked to everywhere everything we need to get DSFML working on our system?  I.E. this has DSFML and DSFML-C all wrapped up and we don't need to build DSFML on these seemingly DSFML-C files?

Correct.  I didn't have to download anything else related to SFML or SFML-C or DSFML-C (and this computer had not been used for any SFML dev in the past, so I know there wasn't anything lurking anywhere).

Just
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 23, 2013, 09:39:43 pm
Also, for those who were used to building things in the past, is this download that is now linked to everywhere everything we need to get DSFML working on our system?  I.E. this has DSFML and DSFML-C all wrapped up and we don't need to build DSFML on these seemingly DSFML-C files?

Correct.

Kind of. These downloads are only the C libraries that wrap SFML. It doesn't include any D code because that side off things is more likely to change and it's easy enough to rebuild if you need to. 
Title: Re: DSFML-C "Nightlies"
Post by: malkierian on December 23, 2013, 10:54:41 pm
You may want to restore the building instructions then on the DSFML Github, because I couldn't find them anywhere.
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 23, 2013, 11:19:30 pm
Wiki recently had some updates.

Check things out here(for Windows):
https://github.com/Jebbs/DSFML/wiki/Getting-Started-in-Windows
Title: Re: DSFML-C "Nightlies"
Post by: malkierian on December 24, 2013, 02:06:44 am
OK, I did manage to find the instructions a little buried, but doesn't it build against the DSFML-C libraries?  How do I tell it where to look?  It seems to succeed automatically, but I don't know how to guarantee it's building against the latest libs.
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 24, 2013, 07:42:32 am
OK, I did manage to find the instructions a little buried, but doesn't it build against the DSFML-C libraries?

Buried? There was a link to the build instructions on the page I linked above. :P And it wouldn't build correctly if it couldn't find the dsfml-xxx.lib files. Those are what connect it to the dll's.

Quote
How do I tell it where to look?  It seems to succeed automatically, but I don't know how to guarantee it's building against the latest libs.

On Windows, you need to use the -L+Path compiler option. For example:
dmd main.d -L+C:\Users\Jeremy\Desktop\dsfml\ dsfml-graphics.lib dsfml-window.lib dsfml-system.lib

This looks for all the .lib files in C:\Users\Jeremy\Desktop\dsfml\

You have to make sure the right dll's end up in the exe directory though.
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 24, 2013, 09:33:59 am
OK, I did manage to find the instructions a little buried, but doesn't it build against the DSFML-C libraries?

Buried? There was a link to the build instructions on the page I linked above. :P And it wouldn't build correctly if it couldn't find the dsfml-xxx.lib files. Those are what connect it to the dll's.

Edit:
Some of the wording in the wiki could probably be improved. I'll look into this and see what I can fix.

Quote
How do I tell it where to look?  It seems to succeed automatically, but I don't know how to guarantee it's building against the latest libs.

On Windows, you need to use the -L+Path compiler option. For example:
dmd main.d -L+C:\Users\Jeremy\Desktop\dsfml\ dsfml-graphics.lib dsfml-window.lib dsfml-system.lib

This looks for all the .lib files in C:\Users\Jeremy\Desktop\dsfml\

You have to make sure the right dll's end up in the exe directory though.
Title: Re: DSFML-C "Nightlies"
Post by: malkierian on December 24, 2013, 04:40:59 pm
So if it is finding the lib files automatically when building DSFML, where do I put the new ones I just downloaded for it to build against?  Will what you posted (the dmd main.d line) work for building DSFML too?
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 30, 2013, 05:49:38 am
So if it is finding the lib files automatically when building DSFML, where do I put the new ones I just downloaded for it to build against?  Will what you posted (the dmd main.d line) work for building DSFML too?

Just realized I didn't answer this, but I think our other conversations covered it, yes?
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 30, 2013, 05:50:21 am
Just updated the first post to include a user contributed OS X build as well as a 32bit Linux build.
Title: Re: DSFML-C "Nightlies"
Post by: abjorn on December 30, 2013, 09:06:19 pm
Having trouble using the nightly DSFML-C on Linux. My dub config looks like this:

Code: [Select]
{
    "name": "shmup",
    "stringImportPaths": ["content/"],
    "lflags" : ["-Llib"],
    "libs": [
        "jpeg",
        "GL",
        "GLU",
        "GLEW",
        "freetype",
        "X11",
        "Xrandr"
    ],
    "dependencies": {
        "dsfml:graphics": "~master"
    }
}

I have the DSFML-C shared libraries in "lib" in my project folder, however, when it comes time to build, the linker spits back this error:

Quote
Linking...
lib/libdsfml-graphics.so: undefined reference to `XCreateIC'
lib/libdsfml-graphics.so: undefined reference to `XQueryExtension'
lib/libdsfml-graphics.so: undefined reference to `__glewDeleteFramebuffersEXT'
lib/libdsfml-graphics.so: undefined reference to `XRRFreeScreenConfigInfo'
lib/libdsfml-graphics.so: undefined reference to `glXMakeCurrent'
lib/libdsfml-graphics.so: undefined reference to `XFree'
lib/libdsfml-graphics.so: undefined reference to `glEnable'
lib/libdsfml-graphics.so: undefined reference to `__glewUniformMatrix4fvARB'
lib/libdsfml-graphics.so: undefined reference to `XMoveWindow'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_EXT_blend_func_separate'
lib/libdsfml-graphics.so: undefined reference to `glTexCoordPointer'
lib/libdsfml-graphics.so: undefined reference to `XFreeCursor'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_ARB_shading_language_100'
lib/libdsfml-graphics.so: undefined reference to `glXGetConfig'
lib/libdsfml-graphics.so: undefined reference to `glPushClientAttrib'
lib/libdsfml-graphics.so: undefined reference to `FT_Select_Charmap'
lib/libdsfml-graphics.so: undefined reference to `glPopAttrib'
lib/libdsfml-graphics.so: undefined reference to `__glewGetHandleARB'
lib/libdsfml-graphics.so: undefined reference to `jpeg_write_scanlines'
lib/libdsfml-graphics.so: undefined reference to `glEnableClientState'
lib/libdsfml-graphics.so: undefined reference to `FT_Set_Pixel_Sizes'
lib/libdsfml-graphics.so: undefined reference to `XStoreName'
lib/libdsfml-graphics.so: undefined reference to `glMatrixMode'
lib/libdsfml-graphics.so: undefined reference to `__glewBindFramebufferEXT'
lib/libdsfml-graphics.so: undefined reference to `glDisable'
lib/libdsfml-graphics.so: undefined reference to `XLookupString'
lib/libdsfml-graphics.so: undefined reference to `__glewGenFramebuffersEXT'
lib/libdsfml-graphics.so: undefined reference to `__glewCheckFramebufferStatusEXT'
lib/libdsfml-graphics.so: undefined reference to `glClear'
lib/libdsfml-graphics.so: undefined reference to `__glewAttachObjectARB'
lib/libdsfml-graphics.so: undefined reference to `XCreateImage'
lib/libdsfml-graphics.so: undefined reference to `glXChooseFBConfig'
lib/libdsfml-graphics.so: undefined reference to `__glewRenderbufferStorageEXT'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_ARB_fragment_shader'
lib/libdsfml-graphics.so: undefined reference to `XRRSetScreenConfig'
lib/libdsfml-graphics.so: undefined reference to `glGetError'
lib/libdsfml-graphics.so: undefined reference to `__glewUniform1fARB'
lib/libdsfml-graphics.so: undefined reference to `__glewFramebufferTexture2DEXT'
lib/libdsfml-graphics.so: undefined reference to `glXDestroyContext'
lib/libdsfml-graphics.so: undefined reference to `XListDepths'
lib/libdsfml-graphics.so: undefined reference to `glXCreateContext'
lib/libdsfml-graphics.so: undefined reference to `XSetWMNormalHints'
lib/libdsfml-graphics.so: undefined reference to `XGrabPointer'
lib/libdsfml-graphics.so: undefined reference to `FT_Done_FreeType'
lib/libdsfml-graphics.so: undefined reference to `FT_Outline_Embolden'
lib/libdsfml-graphics.so: undefined reference to `XConvertCase'
lib/libdsfml-graphics.so: undefined reference to `__glewLinkProgramARB'
lib/libdsfml-graphics.so: undefined reference to `XCreateWindow'
lib/libdsfml-graphics.so: undefined reference to `glPushAttrib'
lib/libdsfml-graphics.so: undefined reference to `__glewGetObjectParameterivARB'
lib/libdsfml-graphics.so: undefined reference to `XCreateColormap'
lib/libdsfml-graphics.so: undefined reference to `glClearColor'
lib/libdsfml-graphics.so: undefined reference to `XQueryKeymap'
lib/libdsfml-graphics.so: undefined reference to `XOpenDisplay'
lib/libdsfml-graphics.so: undefined reference to `glReadPixels'
lib/libdsfml-graphics.so: undefined reference to `XAllocWMHints'
lib/libdsfml-graphics.so: undefined reference to `XFilterEvent'
lib/libdsfml-graphics.so: undefined reference to `jpeg_set_defaults'
lib/libdsfml-graphics.so: undefined reference to `jpeg_set_quality'
lib/libdsfml-graphics.so: undefined reference to `XDrawPoint'
lib/libdsfml-graphics.so: undefined reference to `XDestroyWindow'
lib/libdsfml-graphics.so: undefined reference to `XCloseDisplay'
lib/libdsfml-graphics.so: undefined reference to `Xutf8LookupString'
lib/libdsfml-graphics.so: undefined reference to `glXGetCurrentContext'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_ARB_shader_objects'
lib/libdsfml-graphics.so: undefined reference to `__glewUniform2fARB'
lib/libdsfml-graphics.so: undefined reference to `glXSwapBuffers'
lib/libdsfml-graphics.so: undefined reference to `glPopClientAttrib'
lib/libdsfml-graphics.so: undefined reference to `glGetTexImage'
lib/libdsfml-graphics.so: undefined reference to `XUnsetICFocus'
lib/libdsfml-graphics.so: undefined reference to `XUnmapWindow'
lib/libdsfml-graphics.so: undefined reference to `glewInit'
lib/libdsfml-graphics.so: undefined reference to `glBlendFunc'
lib/libdsfml-graphics.so: undefined reference to `XCreatePixmapFromBitmapData'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_EXT_framebuffer_object'
lib/libdsfml-graphics.so: undefined reference to `XCreatePixmapCursor'
lib/libdsfml-graphics.so: undefined reference to `glCopyTexSubImage2D'
lib/libdsfml-graphics.so: undefined reference to `FT_Open_Face'
lib/libdsfml-graphics.so: undefined reference to `__glewDeleteRenderbuffersEXT'
lib/libdsfml-graphics.so: undefined reference to `XFreeGC'
lib/libdsfml-graphics.so: undefined reference to `jpeg_start_compress'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_ARB_texture_non_power_of_two'
lib/libdsfml-graphics.so: undefined reference to `glBindTexture'
lib/libdsfml-graphics.so: undefined reference to `__glewDeleteObjectARB'
lib/libdsfml-graphics.so: undefined reference to `FT_Get_Kerning'
lib/libdsfml-graphics.so: undefined reference to `XSetWMProtocols'
lib/libdsfml-graphics.so: undefined reference to `glLoadMatrixf'
lib/libdsfml-graphics.so: undefined reference to `glDeleteTextures'
lib/libdsfml-graphics.so: undefined reference to `glewGetErrorString'
lib/libdsfml-graphics.so: undefined reference to `FT_Init_FreeType'
lib/libdsfml-graphics.so: undefined reference to `__glewCreateProgramObjectARB'
lib/libdsfml-graphics.so: undefined reference to `__glewUseProgramObjectARB'
lib/libdsfml-graphics.so: undefined reference to `XResizeWindow'
lib/libdsfml-graphics.so: undefined reference to `glGetIntegerv'
lib/libdsfml-graphics.so: undefined reference to `XMapWindow'
lib/libdsfml-graphics.so: undefined reference to `FT_Bitmap_Embolden'
lib/libdsfml-graphics.so: undefined reference to `jpeg_destroy_compress'
lib/libdsfml-graphics.so: undefined reference to `__glewCreateShaderObjectARB'
lib/libdsfml-graphics.so: undefined reference to `XCreateGC'
lib/libdsfml-graphics.so: undefined reference to `__glewUniform3fARB'
lib/libdsfml-graphics.so: undefined reference to `XSelectInput'
lib/libdsfml-graphics.so: undefined reference to `XDestroyIC'
lib/libdsfml-graphics.so: undefined reference to `XFlush'
lib/libdsfml-graphics.so: undefined reference to `__glewGetInfoLogARB'
lib/libdsfml-graphics.so: undefined reference to `glTexImage2D'
lib/libdsfml-graphics.so: undefined reference to `XSetICFocus'
lib/libdsfml-graphics.so: undefined reference to `XWarpPointer'
lib/libdsfml-graphics.so: undefined reference to `XRRConfigSizes'
lib/libdsfml-graphics.so: undefined reference to `XPutImage'
lib/libdsfml-graphics.so: undefined reference to `glDrawArrays'
lib/libdsfml-graphics.so: undefined reference to `XCheckIfEvent'
lib/libdsfml-graphics.so: undefined reference to `FT_Done_Glyph'
lib/libdsfml-graphics.so: undefined reference to `__glewUniform1iARB'
lib/libdsfml-graphics.so: undefined reference to `XOpenIM'
lib/libdsfml-graphics.so: undefined reference to `jpeg_CreateCompress'
lib/libdsfml-graphics.so: undefined reference to `FT_New_Memory_Face'
lib/libdsfml-graphics.so: undefined reference to `FT_Glyph_To_Bitmap'
lib/libdsfml-graphics.so: undefined reference to `__glewUniform4fARB'
lib/libdsfml-graphics.so: undefined reference to `FT_New_Face'
lib/libdsfml-graphics.so: undefined reference to `XRRConfigCurrentConfiguration'
lib/libdsfml-graphics.so: undefined reference to `__glewGenRenderbuffersEXT'
lib/libdsfml-graphics.so: undefined reference to `glTexSubImage2D'
lib/libdsfml-graphics.so: undefined reference to `jpeg_stdio_dest'
lib/libdsfml-graphics.so: undefined reference to `XDefineCursor'
lib/libdsfml-graphics.so: undefined reference to `glPushMatrix'
lib/libdsfml-graphics.so: undefined reference to `FT_Load_Char'
lib/libdsfml-graphics.so: undefined reference to `glFlush'
lib/libdsfml-graphics.so: undefined reference to `XInternAtom'
lib/libdsfml-graphics.so: undefined reference to `glGetString'
lib/libdsfml-graphics.so: undefined reference to `XGrabKeyboard'
lib/libdsfml-graphics.so: undefined reference to `FT_Get_Char_Index'
lib/libdsfml-graphics.so: undefined reference to `__glewBlendFuncSeparateEXT'
lib/libdsfml-graphics.so: undefined reference to `__glewGetUniformLocationARB'
lib/libdsfml-graphics.so: undefined reference to `__glewActiveTextureARB'
lib/libdsfml-graphics.so: undefined reference to `XQueryPointer'
lib/libdsfml-graphics.so: undefined reference to `XGetVisualInfo'
lib/libdsfml-graphics.so: undefined reference to `XVisualIDFromVisual'
lib/libdsfml-graphics.so: undefined reference to `XKeysymToKeycode'
lib/libdsfml-graphics.so: undefined reference to `jpeg_std_error'
lib/libdsfml-graphics.so: undefined reference to `XGetWindowAttributes'
lib/libdsfml-graphics.so: undefined reference to `XRRGetScreenInfo'
lib/libdsfml-graphics.so: undefined reference to `FT_Get_Glyph'
lib/libdsfml-graphics.so: undefined reference to `__glewCompileShaderARB'
lib/libdsfml-graphics.so: undefined reference to `XChangeProperty'
lib/libdsfml-graphics.so: undefined reference to `glVertexPointer'
lib/libdsfml-graphics.so: undefined reference to `glPopMatrix'
lib/libdsfml-graphics.so: undefined reference to `XFreePixmap'
lib/libdsfml-graphics.so: undefined reference to `__GLEW_ARB_vertex_shader'
lib/libdsfml-graphics.so: undefined reference to `glXGetProcAddress'
lib/libdsfml-graphics.so: undefined reference to `glViewport'
lib/libdsfml-graphics.so: undefined reference to `__glewShaderSourceARB'
lib/libdsfml-graphics.so: undefined reference to `FT_Done_Face'
lib/libdsfml-graphics.so: undefined reference to `XCreatePixmap'
lib/libdsfml-graphics.so: undefined reference to `__glewBindRenderbufferEXT'
lib/libdsfml-graphics.so: undefined reference to `glColorPointer'
lib/libdsfml-graphics.so: undefined reference to `jpeg_finish_compress'
lib/libdsfml-graphics.so: undefined reference to `XCloseIM'
lib/libdsfml-graphics.so: undefined reference to `glTexParameteri'
lib/libdsfml-graphics.so: undefined reference to `__glewFramebufferRenderbufferEXT'
lib/libdsfml-graphics.so: undefined reference to `XSetWMHints'
lib/libdsfml-graphics.so: undefined reference to `XSetWindowColormap'
lib/libdsfml-graphics.so: undefined reference to `glGenTextures'
collect2: error: ld returned 1 exit status
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on December 30, 2013, 09:33:42 pm
Having trouble using the nightly DSFML-C on Linux. My dub config looks like this:

Code: [Select]
{
    "name": "shmup",
    "stringImportPaths": ["content/"],
    "lflags" : ["-Llib"],
    "libs": [
        "jpeg",
        "GL",
        "GLU",
        "GLEW",
        "freetype",
        "X11",
        "Xrandr"
    ],
    "dependencies": {
        "dsfml:graphics": "~master"
    }
}

I have the DSFML-C shared libraries in "lib" in my project folder, however, when it comes time to build, the linker spits back this error:

Quote
Linking...

undefined reference to everything!

collect2: error: ld returned 1 exit status

This problem happens because DUB includes all the libraries before the DSFML-C libs, so you get all those pesky undefined references. This was a problem someone else had mentioned to me, but I only just had fixed it last night. Maybe DUB hasn't updated the repo on your computer yet? You shouldn't have to add all the libraries any longer either. They are now included automatically.
Title: Re: DSFML-C "Nightlies"
Post by: abjorn on December 30, 2013, 09:53:17 pm
Having trouble using the nightly DSFML-C on Linux. My dub config looks like this:

Code: [Select]
{
    "name": "shmup",
    "stringImportPaths": ["content/"],
    "lflags" : ["-Llib"],
    "libs": [
        "jpeg",
        "GL",
        "GLU",
        "GLEW",
        "freetype",
        "X11",
        "Xrandr"
    ],
    "dependencies": {
        "dsfml:graphics": "~master"
    }
}

I have the DSFML-C shared libraries in "lib" in my project folder, however, when it comes time to build, the linker spits back this error:

Quote
Linking...

undefined reference to everything!

collect2: error: ld returned 1 exit status

This problem happens because DUB includes all the libraries before the DSFML-C libs, so you get all those pesky undefined references. This was a problem someone else had mentioned to me, but I only just had fixed it last night. Maybe DUB hasn't updated the repo on your computer yet? You shouldn't have to add all the libraries any longer either. They are now included automatically.

Ah, looks like removing the library dependencies worked out. Thanks :)
Title: Re: DSFML-C "Nightlies"
Post by: Jebbs on August 10, 2014, 07:56:25 am
I have just updated the original post to include the most up to date code that will build with the code in DSFML's master repo. I'm almost finished getting my build system in place, so the original post will always have the most up to date binaries from now on.