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

Pages: [1]
1
General / Netbeans "No documentation found"
« on: August 25, 2013, 08:33:50 pm »
Hi, I recently set up SFML 2.1 on my linux machine, I have it working with netbeans but whenever the auto-complete box pops up I get no suggestions, other than a message "No documentation found". Does anyone know where the SFML documentation live? I assume SFML/doc/ but I am probably wrong. Also how can I get netbeans to use the documentation for auto-complete assistance ?

Thanks in advance :)

2
General / Re: Getting SFML working on Ubuntu based Linux
« on: August 24, 2013, 03:57:42 am »
Thanks for pointing me in the rite direction.
I followed this tutorial:
http://www.sfml-dev.org/tutorials/2.1/compile-with-cmake.php

It was a bit intimidating at first but I got there step by step.
I'd suggest for other newcomers attempting this install, synaptic package manager if you haven't got it already :

sudo apt-get install synaptic

It makes finding the correct packages actually possible!

Also installing the gui cmake tool as suggested in the tutorial makes the terminal a lot less cluttered :

sudo apt-get install cmake-qt-gui

I think that's about it, I hope this can help others  :)

3
General / Getting SFML working on Ubuntu based Linux
« on: August 24, 2013, 01:32:24 am »
Hi everyone, I'm sure similar questions have been asked but my issue is probably very straight forward for those in the know, and I figure I'll probably just confuse things even more if I try and adapt other peoples solutions considering I'm not 100% confident about tackling the issue (hence the reason I am here).

I'm running ElementaryOS Luna (Ubuntu based) running kernel 3.8.

I have gcc version 4.6.3 installed, and as expected it works perfectly fine with Netbeans with respect to compiling C++ programs.

I'm following this tutorial: http://www.sfml-dev.org/tutorials/2.1/start-linux.php.
So far I have run sudo apt-get install libsfml-dev.
No problems there.

I copied the following code and saved it to a .cpp file :

#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 then ran g++ -c main.cpp and it compiled fine.

Next up I run g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system  as per the tutorial linked above. That's when it all goes wrong, terminal output is as follows :

james@LunaBook:~$ cd NetBeansProjects/
james@LunaBook:~/NetBeansProjects$ g++ main.o -o sfml-app -lsfml-graphics -lsfml-window -lsfml-system
main.o: In function `main':
main.cpp:(.text+0xeb): undefined reference to `sf::String::String(char const*, std::locale const&)'
main.cpp:(.text+0x12d): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
main.cpp:(.text+0x161): undefined reference to `sf::CircleShape::CircleShape(float, unsigned int)'
main.cpp:(.text+0x175): undefined reference to `sf::Shape::setFillColor(sf::Color const&)'
main.cpp:(.text+0x190): undefined reference to `sf::Window::close()'
main.cpp:(.text+0x1a6): undefined reference to `sf::Window::pollEvent(sf::Event&)'
main.cpp:(.text+0x1e5): undefined reference to `sf::RenderTarget::clear(sf::Color const&)'
main.cpp:(.text+0x1fc): undefined reference to `sf::RenderStates::Default'
main.cpp:(.text+0x207): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
main.cpp:(.text+0x216): undefined reference to `sf::Window::display()'
main.cpp:(.text+0x225): undefined reference to `sf::Window::isOpen() const'
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'
collect2: ld returned 1 exit status
james@LunaBook:~/NetBeansProjects$
 

So I think there is some issue with things not being visible to the linker?

If someone could explain to me how I can fix this problem and linker problems in general it would be greatly appreciated.

Thanks in advance.


Pages: [1]