Giter Club home page Giter Club logo

Comments (15)

Jebbs avatar Jebbs commented on August 24, 2024

What version of SFML are you building with? Those functions should be part of SFML 2.4, which this version of DSFML is based on.

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

I don't know what I'm doing :)
Do I need to install libsfml (and libcsfml) beforehand? I did [re]install libsfml-* and tried again using HEAD, i.e. without -b 2.1 --depth 1.
DSFMLC built and installed fine, DSFML again gives the error from above.
dsfmlc said during installation '2.1', is that right?

-- Installing: /usr/local/lib/libdsfmlc-system.so.2.1
-- Up-to-date: /usr/local/lib/libdsfmlc-system.so.2
-- Up-to-date: /usr/local/lib/libdsfmlc-system.so

I have sfml 2.4 libs installed, for example: /usr/lib/x86_64-linux-gnu/libsfml-system.so.2.4
but also the dsfmlc 2.1 libs, for example: /usr/local/lib/libdsfmlc-system.so.2.1

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

It seems that you're mixing different versions of things, which really means that there aren't good instructions available. That's on me.

I've been working on new instructions and tutorials for the website, and I'll go ahead and publish what I have later today. It should allow you to build something with DSFML 2.4

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

Note: The following builds the 2.1 version specifically. If you want to build git HEAD, just use git clone https://github.com/Jebbs/DSFMLC.git

That's what I used and it built and installed, though version 2.1 it seems.
Now I tried using -b 2.4 explicitly but I get build errors after make:

/home/user/Downloads/d/dsfml/DSFML20190423/DSFMLC/src/SFML/Window/Unix/GlxExtensions.hpp:123:3: error: conflicting declaration ‘typedef struct GLXHyperpipeNetworkSGIX GLXHyperpipeNetworkSGIX’

I also had to install xcb-image and udev libs for cmake succeed first.

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

The project has changed significantly since v2.1, so I suggest you try to build with v2.4.

The 2.4 branch is actually out of date and should be removed, but the master branch should work just fine. If you look at the new tutorials, they should give you enough information. Just substitute any non-existent tags/branches for master.

Just an FYI, the new website is very much a work in progress and most of it is not ready. These tutorials should be close enough to get you started, though.

Let me know if this works for you and sorry about taking so long to reply.

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

Thank you!
I could build dsfml now with the instructions from Linux and GDC, but using git clone https://github.com/jebbs/dsfml instead. But I don't know what to use for dmd ... -L-LDSFMLC\lib\ ... to compile the example. Should I still build dsfmlc separately?

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

Ah, that's a typo in the instructions.DSFMLC is no longer a separate library, it's built as part of DSFML and embedded into the DSFML static libraries. You'll want the linker path to point to your SFML location.

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

I tried without -L-LDSFMLC\lib\:

dmd test.d -Idsfml/src/ -L-Ldsfml/lib/ -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-lsfml-graphics -L-lsfml-window -L-lsfml-system

...
/usr/bin/ld: dsfml/lib//libdsfml-system.a(ErrStream.cpp.o): undefined reference to symbol '_ZNSt15basic_streambufIcSt11char_traitsIcEE7seekoffElSt12_Ios_SeekdirSt13_Ios_Openmode@@GLIBCXX_3.4'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

I tried adding -L-lstdc++ (and installed libstdc++-6-dev) but same errors.

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

Where at in your command line did you add libstdc++? I don't think it will work unless it's the last library included.

dmd test.d -Idsfml/src -L-Ldsfml/lib -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-lsfml-graphics -L-lsfml-window -L-lsfml-system -L-lstdc++

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

ok, different error now, about lockingTextWriter (my dmd version is DMD64 D Compiler v2.085.1):

[user]~/Downloads/d/dsfml/DSFML20190429>dmd test.d -Idsfml/src -L-Ldsfml/lib -L-ldsfml-graphics -L-ldsfml-window -L-ldsfml-system -L-lsfml-graphics -L-lsfml-window -L-lsfml-system -L-lstdc++
dsfml/src/dsfml/window/event.d(354): Deprecation: struct `dsfml.window.event.Event.MouseWheelEvent` is deprecated - This event is deprecated and potentially inaccurate. Use MouseWheelScrollEvent instead.
dsfml/src/dsfml/window/event.d(354): Deprecation: struct `dsfml.window.event.Event.MouseWheelEvent` is deprecated - This event is deprecated and potentially inaccurate. Use MouseWheelScrollEvent instead.
dsfml/src/dsfml/graphics/renderwindow.d(493): Deprecation: dsfml.graphics.renderwindow.RenderWindow.setJoystickThreshhold is overriding the deprecated method dsfml.window.window.Window.setJoystickThreshhold
dsfml/src/dsfml/graphics/renderwindow.d(493): Deprecation: dsfml.graphics.renderwindow.RenderWindow.setJoystickThreshhold cannot be marked as deprecated because it is overriding a function in the base class
dsfml/src/dsfml/graphics/renderwindow.d(536): Deprecation: dsfml.graphics.renderwindow.RenderWindow.setTitle is overriding the deprecated method dsfml.window.window.Window.setTitle
dsfml/src/dsfml/graphics/renderwindow.d(548): Deprecation: dsfml.graphics.renderwindow.RenderWindow.setTitle is overriding the deprecated method dsfml.window.window.Window.setTitle
dsfml/src/dsfml/graphics/renderwindow.d(645): Deprecation: dsfml.graphics.renderwindow.RenderWindow.create is overriding the deprecated method dsfml.window.window.Window.create
dsfml/src/dsfml/graphics/renderwindow.d(645): Deprecation: dsfml.graphics.renderwindow.RenderWindow.create cannot be marked as deprecated because it is overriding a function in the base class
dsfml/src/dsfml/graphics/renderwindow.d(654): Deprecation: dsfml.graphics.renderwindow.RenderWindow.create is overriding the deprecated method dsfml.window.window.Window.create
test.d(7): Deprecation: constructor `dsfml.graphics.renderwindow.RenderWindow.__ctor!char.this` is deprecated - Use the constructor that takes a 'const(dchar)[]' instead.
dsfml/lib/libdsfml-graphics.a(image.o): In function `_D5dsfml8graphics5image5Image13getPixelArrayMxFZAxh':
image.d:(.text+0x37a): undefined reference to `_D3std5stdio4File17lockingTextWriterMFNfZS3std5stdio4File17LockingTextWriter'
image.d:(.text+0x3b9): undefined reference to `_D3std5stdio4File17LockingTextWriter7handle_MFNdNeZPS4core4stdc5stdio8_IO_FILE'
image.d:(.text+0x3e4): undefined reference to `_D3std5stdio4File17LockingTextWriter7handle_MFNdNeZPS4core4stdc5stdio8_IO_FILE'
....

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

Could my dmd.conf be messing something up (I think it's unchanged/original)?

[user]~/Downloads/d/dsfml/DSFML20190429>cat /etc/dmd.conf
;
; dmd.conf file for dmd
;
; dmd will look for dmd.conf in the following sequence of directories:
;   - current working directory
;   - directory specified by the HOME environment variable
;   - directory dmd resides in
;   - /etc directory
;
; Names enclosed by %% are searched for in the existing environment and inserted
;
; The special name %@P% is replaced with the path to this file
;

[Environment32]
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/i386-linux-gnu -L--export-dynamic

[Environment64]
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/x86_64-linux-gnu -L--export-dynamic -fPIC

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

That almost looks like it isn't linking with the standard library. When you installed dmd, did you also install libphobos?

from dsfml.

kunftep avatar kunftep commented on August 24, 2024

phobos seems to be installed, and I can compile other d code, even using std.stdio.File.lockingTextWriter:

[user]~/Downloads/d/dsfml/DSFML20190429>cat test_phobos.d
void main() {
    import std.stdio;
    File f = File("test_phobos.d");
    writeln(f);
    auto ltw = f.lockingTextWriter();
    writeln(ltw);
}
[user]~/Downloads/d/dsfml/DSFML20190429>dmd test_phobos.d 
[user]~/Downloads/d/dsfml/DSFML20190429>./test_phobos 
File(561481FB50A0, "test_phobos.d")
LockingTextWriter(File(561481FB50A0, "test_phobos.d"), 0, '\0')
[user]~/Downloads/d/dsfml/DSFML20190429>

from dsfml.

Jebbs avatar Jebbs commented on August 24, 2024

If you can compile and link something outside of DSFML then I'm not sure what could be the problem. The only thing I can think to suggest would be do a fresh/clean build and see if that works.

If you still have problems, let me know what distro you're using and I'll see if I can reproduce.

from dsfml.

NewNova88 avatar NewNova88 commented on August 24, 2024

Hello there. I have the same problem, but with WAY MORE "undefined reference". It was a pain to install because my SFML was 2.5 and I needed to go back to 2.4 (because of the original subject with audio listener).
If you can find a solution (or just update dsfml with sfml 2.5) that would be great !
I will try some things and if I found a solution I let you know. I'm on Debian Buster.

from dsfml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.