Main Menu
Menu

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.

Show posts Menu

Messages - texus

#1351
Installation help / Re: Cmake problem
10 August 2014, 00:24:44
Quotehow do I uninstall SFML safely?
By doing the opposite of how you installed it. I have no idea how you installed it. Perhaps you used apt-get and then you uninstall it with "apt-get remove sfml" or "apt-get remove sfml-dev" or something similar.

QuoteSo how do I do?
The latest version of sfml depends on the xrandr library which is missing from your system (I guess sfml 2.1 didn't use xrandr yet).
I think you install it with "sudo apt-get install xrandr" but it has been a while since I have used ubuntu.
#1352
Installation help / Re: Cmake problem
10 August 2014, 00:12:52
You said you have the latest sfml version installed, but I don't think you have.

SFML 2.1 has no destructor in the Image class, this was added later.
So it seems like TGUI has been linked to a later version of sfml, while the library you are looking at is from SFML 2.1.
Do you perhaps have multiple versions on your pc?

I would uninstall everything from sfml that you have and then really install the latest version (install git if you don't have it yet).
git clone https://github.com/LaurentGomila/SFML
mkdir SFML/build
cd SFML/build
cmake ..
make -j4
sudo make install


Then try installing tgui again.
git clone https://github.com/texus/TGUI
mkdir TGUI/build
cd TGUI/build
cmake ..
make -j4
sudo make install
#1353
Installation help / Re: Cmake problem
10 August 2014, 00:08:58
Wait before you ask on the sfml forum, I just figured something out.
#1354
Installation help / Re: Cmake problem
10 August 2014, 00:04:58
Then your libsfml-graphics.so is indeed missing a destructor for the Image class. I would think you are also going to have problems with just using sfml without tgui, since sf::Image::~Image just isn't there. The lines with the C instead of the D are the constructors of the class.

If you don't get any further problems then you can continue like this, but now we know that the problem lies with sfml. I'm not sure how you installed it, but if you get further trouble then you should try to re-install it or install it in another way.
#1355
Installation help / Re: Cmake problem
09 August 2014, 23:48:38
Apparently you need to use "nm --dynamic" instead of just "nm", although I didn't need it on my system (but I'm using arch and not debian/ubuntu like you). (based on https://lists.debian.org/debian-user/1997/11/msg00428.html)

I'm not even sure if there is anything interesting to find in these so files or not. I'm just guessing random stuff because I don't understand why it can complain about just one missing symbol.

Edit: running "nm --dynamic /usr/local/lib/libsfml-graphics.so -C | grep sf::Image::~Image" might be more clear and should return 2 lines.
#1356
Installation help / Re: Cmake problem
09 August 2014, 23:32:59
The ".." assumes that you are running cmake from a build folder, to avoid that a lot of cmake cache files are created inside the tgui folder.
I didn't care about this in the tutorial since it doesn't matter for the tgui users, but I'm used to using a build folder to avoid these cmake files showing up in git.

Quoteeverything went perfectly
I hope it stays that way. Because that error indicates that a function is missing from libsfml-graphics.so. But if it wouldn't be linking to it at all then you would get tons of these undefined reference errors.

You could possibly check if the file really misses the function or not.
Running this in the terminal should give a small list of functions and _ZN2sf5ImageD1Ev and _ZN2sf5ImageD2Ev should be in that list (with a T in front of them).
nm /usr/local/lib/libsfml-graphics.so | grep sf5Image
#1357
Installation help / Re: Cmake problem
09 August 2014, 23:07:06
I have never encountered this problem before.
I even just tried with the latest tgui version and with both the latest sfml and with sfml 2.1 and I don't get this error.

Anything you might have done special (running something else than "cmake .." or having a different sfml version)?
Can you draw something on the screen with just sfml?

The library seems to build fine, so if you run "cmake -DTGUI_BUILD_FORM_BUILDER=FALSE .." instead then it will work, you just won't have the form builder (but you can run the provided exe with wine instead of compiling the native one if really necessary). I just fear that you are going to run into similar problems when using tgui in your project.

Perhaps you could also try re-installing sfml, it looks like a very strange error.
#1358
Yes and no.

Actually any sfml 2.x version will do. You just have to make sure that the sfml version used to compile tgui is the same as the one used in your project.

But since there is a bug in sfml 2.1 that influences tgui, and sfml 2.0 is even less stable, you are actually adviced to use the github version of sfml.
#1359
This was a small bug in tgui.

If you download and compile the latest version then the button should no longer remain in hover state.
#1360
Help requests / Re: Formbuilder Problem
28 July 2014, 01:59:13
The bugs should be fixed in the latest version now: https://github.com/texus/TGUI.

You will have to recompile the form builder yourself though, I don't feel like booting up my windows to compile the distributed executable right now.
#1361
Help requests / Re: Formbuilder Problem
28 July 2014, 01:15:17
Thanks for reporting, I have been able to reproduce it so it will be fixed soon.

I'll try to keep the form builder working for v0.6, but I haven't even decided yet if future versions will still have a form builder. With all the changes in v0.7 I would have to completely rewrite it, which is not something that I'm looking forward to.
#1362
I can clearly see that the texture repeat is broken, but I tested the download from my site two days ago with your previous question and the login example ran fine on my pc.

So in order to be certain that its not a problem with your graphics driver, you should try testing a small sfml program.
// Load a small to medium sized texture, set it to repeat
sf::Texture texture;
texture.loadFromFile("Filename.jpg");
texture.setRepeated(true);

// Create the sprite and give it a texture rect that is several times larger than the size of the texture
sf::Sprite sprite;
sprite.setTexture(texture);
sprite.setTextureRect({0, 0, 800, 600});

// Draw the sprite and see if it displays without gaps between the repeated texture
window.draw(sprite);


If that would display correctly then I have a serious problem, if it is broken too then it is only on your pc.

Edit: I just tested the FullExample with v0.6.4 and I cannot reproduce the problem. So there is nothing that I can fix, I can only tell how to get around this problem in case you can't solve it.
#1363
I would expect the same error then when you try to run your own code.

This error isn't necessarily a problem. If you are lucky it is just a caching problem, otherwise your linker isn't searching in the right folder. See if "sudo ldconfig" solves it.
#1364
You didn't change any line from the example code? There are no errors printed in the terminal?

The form builder is just a program that links agains the just build libraries, which means that the libraries have to be build correctly.

The first thing you can try is this:
- open the terminal in the folder TGUI_Path/examples/LoginScreen
- type "g++ LoginScreen.cpp -std=c++11 -ltgui -lsfml-graphics -lsfml-window -lsfml-system"
- run "./a.out"

Does it display a black screen too? If it doesn't, then something is wrong with your code (e.g. a wrong pathname for loading the widgets).
#1365
Linux: error while loading shared libraries

Don't post about the following error, just follow the steps below.
"/pathname/of/program: error while loading shared libraries: libtgui.so: cannot open shared object file: no such file or directory"

First try to run "sudo ldconfig", just to be sure that it isn't a caching problem.

Unfortunately a lot of linux distros install to /usr/local/lib by default, but do not have this folder in the linker seach path.
You could edit "/etc/ld.so.conf" and just add a line that contains "/usr/local/lib/" to it. Then run "sudo ldconfig".