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

Pages: [1] 2
1
General / Re: AW: Eclipse / Makefile / Linux -> Errors ?
« on: July 19, 2013, 10:15:39 pm »
Does exclipse really work with make files? You might want to read up on some Eclipse documentation  ;)

I Think that. You can choose by "create project"  a empty makefile project or a autogenerated makefile project ... :x
and if w write only a console application, it works well.


2
General / Re: Eclipse / Makefile / Linux -> Errors ?
« on: July 19, 2013, 09:48:10 pm »
Thank you ! That works.

The last Problem is just now that the application who is compiled is not starting automaticly in Eclipse when i press "Build & Run"

3
General / Re: Eclipse / Makefile / Linux -> Errors ?
« on: July 19, 2013, 09:31:14 pm »
Your LIBS variable is not used in the makefile.

How you meen that :) ?
Did i must it write different ?

4
General / Re: Eclipse / Makefile / Linux -> Errors ?
« on: July 19, 2013, 09:22:20 pm »
First, thank you for fast answers.

I delete the debug -g option

Code: [Select]
LIBS = -lsfml-graphics -lsfml-window -lsfml-system

all: hello

clean:
rm main.o hello

hello: main.o
g++ -o hello main.o

main.o:
g++ -c main.cpp

But it is still not working. I dont know what is exactly the problem (alredy bought a book about make but it is not arrived ^^).

Is there still sth. not ok ?

Code: [Select]
21:23:04 **** Incremental Build of configuration Default for project testSFML ****
make all
g++ -o hello main.o
main.o: In function `main':
main.cpp:(.text+0xf7): undefined reference to `sf::String::String(char const*, std::locale const&)'
main.cpp:(.text+0x115): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
main.cpp:(.text+0x148): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
main.cpp:(.text+0x182): undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'
main.cpp:(.text+0x18e): undefined reference to `sf::Color::Green'
main.cpp:(.text+0x196): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
main.cpp:(.text+0x1b4): undefined reference to `sf::Window::close()'
main.cpp:(.text+0x1cd): undefined reference to `sf::Window::pollEvent(sf::Event&)'
main.cpp:(.text+0x1f5): undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
main.cpp:(.text+0x212): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
main.cpp:(.text+0x229): undefined reference to `sf::RenderStates::Default'
main.cpp:(.text+0x234): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
main.cpp:(.text+0x243): undefined reference to `sf::Window::display()'
main.cpp:(.text+0x252): undefined reference to `sf::Window::isOpen() const'
main.cpp:(.text+0x27d): undefined reference to `sf::RenderWindow::~RenderWindow()'
main.cpp:(.text+0x2ac): undefined reference to `sf::RenderWindow::~RenderWindow()'
main.cpp:(.text+0x2f2): undefined reference to `sf::RenderWindow::~RenderWindow()'
main.o: In function `sf::CircleShape::~CircleShape()':
main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x13): undefined reference to `vtable for sf::CircleShape'
main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x1f): undefined reference to `vtable for sf::CircleShape'
main.cpp:(.text._ZN2sf11CircleShapeD2Ev[_ZN2sf11CircleShapeD5Ev]+0x2b): undefined reference to `sf::Shape::~Shape()'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [hello] Fehler 1

5
General / Eclipse / Makefile / Linux -> Errors ?
« on: July 19, 2013, 03:18:36 pm »
Hello all,

i want to run SFML2 in Eclipse under Linux.  I Just start a new Eclipse empty Makefile C++ Project.
All SFML includes and libs are installed in the standardpath.

Makefile
Code: [Select]
LIBS = -lsfml-graphics -lsfml-window -lsfml-system

all: hello

clean:
rm main.o hello

hello: main.o
g++ -g -o hello main.o

main.o:
g++ -c -g main.cpp

main.cpp
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

i klick Build all:
Code: [Select]
15:16:47 **** Incremental Build of configuration Default for project testSFML ****
make all
g++ -g -o hello main.o
main.o: In function `main':
/home/boo/dev/workspace/testSFML/main.cpp:5: undefined reference to `sf::String::String(char const*, std::locale const&)'
/home/boo/dev/workspace/testSFML/main.cpp:5: undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
/home/boo/dev/workspace/testSFML/main.cpp:5: undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
/home/boo/dev/workspace/testSFML/main.cpp:6: undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'
/home/boo/dev/workspace/testSFML/main.cpp:7: undefined reference to `sf::Color::Green'
/home/boo/dev/workspace/testSFML/main.cpp:7: undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
/home/boo/dev/workspace/testSFML/main.cpp:15: undefined reference to `sf::Window::close()'
/home/boo/dev/workspace/testSFML/main.cpp:12: undefined reference to `sf::Window::pollEvent(sf::Event&)'
/home/boo/dev/workspace/testSFML/main.cpp:18: undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
/home/boo/dev/workspace/testSFML/main.cpp:18: undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
/home/boo/dev/workspace/testSFML/main.cpp:19: undefined reference to `sf::RenderStates::Default'
/home/boo/dev/workspace/testSFML/main.cpp:19: undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
/home/boo/dev/workspace/testSFML/main.cpp:20: undefined reference to `sf::Window::display()'
/home/boo/dev/workspace/testSFML/main.cpp:9: undefined reference to `sf::Window::isOpen() const'
/home/boo/dev/workspace/testSFML/main.cpp:23: undefined reference to `sf::RenderWindow::~RenderWindow()'
/home/boo/dev/workspace/testSFML/main.cpp:5: undefined reference to `sf::RenderWindow::~RenderWindow()'
/home/boo/dev/workspace/testSFML/main.cpp:23: undefined reference to `sf::RenderWindow::~RenderWindow()'
main.o: In function `sf::CircleShape::~CircleShape()':
/usr/local/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `vtable for sf::CircleShape'
/usr/local/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `vtable for sf::CircleShape'
/usr/local/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `sf::Shape::~Shape()'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [hello] Fehler 1

15:16:47 Build Finished (took 203ms)

Does anybody know what i do wrong ?

6
General / Re: Linux , how to link static?
« on: July 16, 2013, 09:03:03 am »
Ah okey :) Thank you !

7
General / Re: Linux , how to link static?
« on: July 15, 2013, 10:58:06 pm »
Thank you for all your answers! I try to figure out your suggestions about sharing shared linked binarys. But there is one thing i still not understand.

Laurent wrote its explained in the getting started tutorial. Maybe i dont understand what he write their, but iam still confused about the compiler command:

-lsfml-graphics -lsfml-window -lsfml-system

how the g++ knows about wich libarys is used?  Or better say: How i know wich libary is used? What is happening with this command? Because i have create 4 libarys for static/shared  debug/release. My folder /usr/local/lib$ ls looks like this:

Quote
libsfml-audio-d.so         libsfml-graphics.so.2.0   libsfml-system.so.2
libsfml-audio-d.so.2       libsfml-network-d.so      libsfml-system.so.2.0
libsfml-audio-d.so.2.0     libsfml-network-d.so.2    libsfml-window-d.so
libsfml-audio-s.a          libsfml-network-d.so.2.0  libsfml-window-d.so.2
libsfml-audio-s-d.a        libsfml-network-s.a       libsfml-window-d.so.2.0
libsfml-audio.so           libsfml-network-s-d.a     libsfml-window-s.a
libsfml-audio.so.2         libsfml-network.so        libsfml-window-s-d.a
libsfml-audio.so.2.0       libsfml-network.so.2      libsfml-window.so
libsfml-graphics-d.so      libsfml-network.so.2.0    libsfml-window.so.2
libsfml-graphics-d.so.2    libsfml-system-d.so       libsfml-window.so.2.0
libsfml-graphics-d.so.2.0  libsfml-system-d.so.2     pkgconfig
libsfml-graphics-s.a       libsfml-system-d.so.2.0   python2.7
libsfml-graphics-s-d.a     libsfml-system-s.a        python3.3
libsfml-graphics.so        libsfml-system-s-d.a
libsfml-graphics.so.2      libsfml-system.so

And their is no libary called "-lsfml-graphics" .   When i use this command, wich libary is in use? the libsfml-graphics-d.so or the libsfml-graphics.so ?   Or is this depends by commands i give the compiler . For example:

-lsfml-graphics -lsfml-window -lsfml-system   ->   compiling the release binarys
-g -lsfml-graphics -lsfml-window -lsfml-system -> compiling the debug binarys

? Or did i missunderstand here something totally?

best regards :) !

8
General / Re: Linux , how to link static?
« on: July 15, 2013, 09:09:35 pm »
ok - i try to ask on another way.

How can i choose when i compilng:

g++ test.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system

wich libarys are used  static/shared/debug/release ?

9
General / Re: Linux , how to link static?
« on: July 15, 2013, 08:55:43 pm »
Why they do something wrong? I Think i dont have compiled with the static libarys?
Because on the website you write this:

Quote
If SFML is not installed in a standard path, you need to tell the library loader where to find the SFML libraries first:
export LD_LIBRARY_PATH=<sfml-install-path>/lib && ./sfml-app

Of course they didnt have installed sfml.  I want to compile it like that they dont need to install :o ?

10
General / Re: Linux , how to link static?
« on: July 15, 2013, 08:46:50 pm »
More details would be welcome.

i compiling like this:

Code: [Select]
g++ -c test.cpp -I /home/brause/dev/include
g++ test.o -o sfml-app -L /home/brause/dev/lib -lsfml-graphics -lsfml-window -lsfml-system

when they start ./sfml-app , they get the message:

"command not found".

but i can start the sfml-app by  ./sfml-app or also doppelclick. This:

Code: [Select]
export LD_LIBRARY_PATH=<sfml-install-path>/lib && ./sfml-app
is not need, dont know why.

11
General / Re: Ubuntu/Code::Blocks - compiler errors
« on: July 15, 2013, 08:22:56 pm »
You must link the dependencies of SFML. When you create a static library no linking is done, it's left to the final binary.

Hello Laurent, thanks for your fast answer.
I want to choose now the way without an IDE. It works. But i have another Problem, that other poeple using Linux cant start my sfml-app. (I have edit my first post and describe it).  How can use the static libarys for compiling?

best regards

12
General / Linux , how to link static?
« on: July 15, 2013, 07:15:08 pm »
Hello all,

i have create static libarys for Linux by this Tutorial in Cmake: http://sfmlcoder.wordpress.com/2011/08/16/building-sfml-2-0-with-make-for-gcc/ Now i have compiled my test app with this tutorial: http://www.sfml-dev.org/tutorials/2.0/start-linux.php

My Question:

Other Poeple cant start my compiled sfml-app.  I think, its because this ways does not use the static linked libarys. But how can i make that?

Thank you for help :) !

13
General / Re: AW: Other poeple need MSVCP110.dll to run my software?
« on: March 17, 2013, 12:50:42 am »
Have you already googled for the problem, I bet you'll find the answer with a single search. ;)

Your friend will have to install the VS redistributables (or so). ;)

I googled for the dll, but not for the problem  - omg xD ... yeah im a noob. But thanks so far.

14
General / Other poeple need MSVCP110.dll to run my software?
« on: March 17, 2013, 12:32:38 am »
Hello all,

i have made a simple game wie C++/SFMl2 via Visual Studio 2010 Express. If send my Gamefiles (static release) to other poeple, they always cant run the project by missing MSVCP110.dll.

Does anyon know how to fix this? I tryed alredy to download this .dll from the internet, but it makes errors and so on. There must be away to compile that this .dll is not longer requested?

Thanks :) !

15
System / Re: Time.aSeconds returns 1e-006 ?
« on: March 16, 2013, 12:41:29 am »
Oh - you are right. I never thinked its a small number  ;D

thanks !

Pages: [1] 2
anything