Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - lehthanis

Pages: [1]
I'm using sfml for keyboard and network.  I wrote my app to run in the console, and so far everything was working just fine on my development PC in a terminal window...

Now I've moved the app to my Ubuntu server, there's no X11 environment, it's only the default command line...so when I run my app, it says failed to open X11 display...I'm sure it's because the keyboard reading is part of sfml-window, but is there anything I can do to make this work?  Even if it involves switching to a different library for keypress detection?

General / Re: Make file problem - rather than revive an old topic.
« on: August 08, 2017, 08:25:15 pm »
Solved, you can close this.

General / [solved] Make file problem - rather than revive an old topic.
« on: August 08, 2017, 07:38:30 pm »
I was looking at this topic to build a makefile: https://en.sfml-dev.org/forums/index.php?topic=9037.0

roarbug's reply was very helpful, and got me pretty far in...but what I'm getting now is that my .o files are not recognized. specifically the error is:

PCSBSocket.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile: 13: recipe for target 'emcserv' failed

I'm getting .o files for all of my various pieces, but the compiler isn't able to put them all together...I think it has something to do with precompiled headers and I maybe shouldn't be doing it that way?

General / Re: Yet another Failed to load font problem.
« on: July 28, 2017, 09:12:03 pm »
yeah I think I am...I'm running in debug mode but using non-debug sfml...would that do it?

General / Yet another Failed to load font problem.
« on: July 28, 2017, 07:45:23 pm »
I'm having a hard time getting a font loaded.  I'm sure it's not a working directory problem because I've checked in my code that I'm manually applying the full path.  The error I get is:

S:\Documents\Visual Studio 2015\Projects\UDPJoySend\x64\Debug\arial.ttf
000007FEFA591120Failed to load font "

string workingdir()
        char buf[256];
        GetCurrentDirectoryA(256, buf);
        return string(buf) + '\\';

int main(int argc, char *argv[])
        RenderWindow window(VideoMode(800, 600), "UDP Joystick Sender");
        string fontfile = workingdir() + "arial.ttf";
        cout << fontfile << "\n";
        if (!font.loadFromFile(fontfile))
                cout << err;
                return 0;

        cout << "Exiting\n";
        return 0;


As you can see it's not telling me WHAT file name it's failing to load.  I've tried it with just the name of the font, and this working dir option.  The font exists in the path shown in the cout line before the error.  Thoughts?

Window / Keyboard in CLI application? KeyReleased event without window?
« on: November 19, 2016, 04:17:26 am »
I'm trying to use the SFML keyboard events in a CLI application...is this possible properly?

I need to trap the output of the keys so it doesn't actually type the letter to the console,
I need to access the KeyReleased event, which only seems to be available in a window, which I don't have.

Is any of this possible?

Pages: [1]