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 - Littleclaws

#1
Got it working, Thanks!  ;)
#2
I have taken the official SFML 2.2 static binaries for Linux 64bits and recompiled TGUI-0.7 as a static library and compiled but it's giving me this :(
g++ src/main.cpp -o a.out -Lbin -Ilib/bin -Ilib/src -std=c++11 -ltgui -lsfml-graphics -lsfml-window -lsfml-system
bin/libtgui.so: undefined reference to `sf::ConvexShape::ConvexShape(unsigned long)'
bin/libtgui.so: undefined reference to `sf::CircleShape::CircleShape(float, unsigned long)'
bin/libtgui.so: undefined reference to `sf::RenderTarget::draw(sf::Vertex const*, unsigned long, sf::PrimitiveType, sf::RenderStates const&)'
bin/libtgui.so: undefined reference to `sf::ConvexShape::setPoint(unsigned long, sf::Vector2<float> const&)'
collect2: error: ld returned 1 exit status
make: *** [default] Error 1

I don't get what's wrong with my code
#3
I tried compiling that and it returns me ...
g++ src/main.cpp -o a.out -Lbin -Ilib/bin -Ilib/src -Ilib/cxx -std=c++11 -lpthread -lGL -lGLU -ltgui-s -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: bin/libtgui-s.a(Gui.cpp.o): undefined reference to symbol 'glEnable'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libGL.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [default] Error 1

No compiling errors but GL is giving me troubles  :-[
Thank you for the help @texus
#4
@texus
After copying the include and bins from libcxx and libcxxabi, I still get errors  :'(
clang++ src/main.cpp -o a.out -std=c++11 -nostdinc++ -lc++ -Lbin -Ilib/bin -Ilib/src -Ilib/cxx -lmysql-s -ltgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s
A lot less errors and warnings, but still ...
I think it's the fact that the examples are outdated and that you don't create objects like that anymore or something like that ...
All the errors are constructor ones ...

Edit 2: Just read your last message, and hey I'm stupid
Checking out the TGUI folder, it comes with it's own examples,
I got it working ... Welp, thanks for answering me and have a nice day!
#5
Yeah, I am currently re-installing llvm. clang and libc++ from scratch, hopefully I'll work this time...
#6
Here's the complete log ...
Edit:
I fixed it by adding these flags to my line:
-std=c++11 -stdlib=libc++ -nostdinc++ -Ic++
So now the full line is...
clang++ src/main.cpp -o a.out -std=c++11 -stdlib=libc++ -nostdinc++ -Ic++ -Lbin -Ilib/bin -Ilib/src -lmysql-s -ltgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s
Also built libcxx from scratch, But idk if that had any effects as my gcc installation is fairly new

Edit 2: In version 0.7-dev, Adding #include <SFML/Window.hpp> as mentionned in the example, brings up an error #include <ostream> file not found ... just to let you know.

Edit 3: Now seems like clang doesn't find it's basic headers, seems like it's an old bug with the libc++ version I have ('string' file not found)
Seems like sudo apt-get upgrade libc++-dev did not fix it ... 
#7
Just tried using g++, it still gives me errors  :-\
I am on Ubuntu by the way ...
#8
Hey y'all

So I stumbled upon TGUI and thought it's the thing I need, so after compiling it (as a static library), copying the login example to my setup and running : clang++ src/main.cpp -o a.out -ltgui-s -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -std=c++0x
I get greeted with this ... (I also tried -std=c++11)
Error in Pastebin because if it wasn't the case, it would exceed the maximum allowed length
And that was not even the full error message ... the rest gets clipped out by the terminal character limit

Any ideas how to fix?
Thank you for reading and have a nice day!
clang -v
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.1.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.1.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.1.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.1.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9