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

Pages: [1]
1
General / using sf::string gives an memory error when closing
« on: April 23, 2009, 10:13:23 pm »
Quote

I think you were confused by the -d suffix, which is for "debug" not "dynamic" ;)


Yeah you are right  :D Sure i also now about debug libraries, but if there is the "-s" for static libraries the "-d" fits so well for dynamic ones :wink:

i think i understand now, thank you very mich :)

2
General / using sf::string gives an memory error when closing
« on: April 23, 2009, 06:24:08 pm »
hmm...
but for example i linked against libsfml-graphics and not against libsfml-graphics-s or libsfml-graphics-d.

Now you told to use the macro SFML_DYNAMIC and it worked.

Now i thought without any macro i link against the static ones, but by setting this macro i link against the dynamic ones, because i neither link against the static nor against the dynamic and leave this question open.

3
General / using sf::string gives an memory error when closing
« on: April 23, 2009, 04:58:56 pm »
yeah, i mean this treads.

i have to admit i don't know much about the using of different types of libraries and the differences, but you told me to define SFML_DYNAMIC
, which solves the problem.

Correct me if i am wrong, but i thought by defining SFML_DYNAMIC you automatically use the dynamic libraries and not the static ones.

4
General / using sf::string gives an memory error when closing
« on: April 23, 2009, 03:27:05 pm »
I created a post some time ago where you gave me the advice to use them, laurent :wink:  

i 'm creating a snake clone, where i save the the piecesof the snake in a list of the stl :)

pushing a sf::shape ( i use sf::sprite now, but it's the same) into the list cause errors but linking dynamic libraries solves

so thanks for solving both my problems :wink:

5
General / using sf::string gives an memory error when closing
« on: April 22, 2009, 06:56:35 pm »
thank you all guys:)

i need dynamic libraries i think, so i'll try the second possibility

Edit: Passing font to strings constructor works fine

6
General / using sf::string gives an memory error when closing
« on: April 20, 2009, 11:02:33 pm »
wow you are very fast:D


is there any way to deal with??

7
General / using sf::string gives an memory error when closing
« on: April 20, 2009, 11:00:23 pm »
hi guys:)

i'm working on a project and i have a problem i dont understand

i declare a variable of the type sf::string and there appears an error message when i close the application

it says: the operation "read" couldn't be executed to the memory in "0x....."

but i just declare the variable and don't do anything else

(sorry i had to translate it on my own)


kwuuak

8
Graphics / problems with sf::shape and list of stl
« on: March 22, 2009, 09:57:42 pm »
thx:)


solved

9
Graphics / problems with sf::shape and list of stl
« on: March 22, 2009, 08:55:55 pm »
then it says:

"error: `class sf::Shape::Rectangle' is not a type "

10
Graphics / problems with sf::shape and list of stl
« on: March 22, 2009, 08:25:39 pm »
hi guys!

i'm trying to make a snake clon right now, but i have problem

for the elements of the snake, i'm using a stl-list of sf::Shape;

as i'm trying to push a shape into the list, there arise some errors

here's the code:

Code: [Select]

#include <iostream>
#include <SFML/Graphics.hpp>
#include <list>

using namespace std;

enum gamestate
{
    menu,spiel,gameover
};

enum richtung
{
    links,rechts,oben,unten
};

sf::RenderWindow fenster(sf::VideoMode(800, 600, 32), "Snake");
gamestate gs = spiel;
richtung richt = links;

const int tilesize = 20;

list<sf::Shape> snake;
list<sf::Shape>::iterator iter;

void draw();
void move();

int main()
{

snake.push_back(sf::Shape::Rectangle(100,100,200,200,sf::Color(0,0,255)));

while (fenster.IsOpened())
{

sf::Event Event;
while (fenster.GetEvent(Event))
        {

        if (Event.Type == sf::Event::Closed)
                fenster.Close();
        }


        move();
        draw();

    }

    return EXIT_SUCCESS;

}


errors arise when adding line:

Code: [Select]

snake.push_back(sf::Shape::Rectangle(100,100,200,200,sf::Color(0,0,255)));



now the errors:

Code: [Select]

Project   : Console application
Compiler  : GNU GCC Compiler (called directly)
Directory : E:\Programmieren\CodeBlocks\meins\sfml snake\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking console executable: E:\Programmieren\CodeBlocks\meins\sfml snake\snake.exe
Info: resolving vtable for sf::Shapeby linking to __imp___ZTVN2sf5ShapeE (auto-import)
Info: resolving vtable for sf::Drawableby linking to __imp___ZTVN2sf8DrawableE (auto-import)
.objs\main.o:main.cpp:(.text$_ZN2sf5ShapeD1Ev[sf::Shape::~Shape()]+0x3a): variable 'vtable for sf::Shape' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\main.o:main.cpp:(.text$_ZN2sf5ShapeC1ERKS0_[sf::Shape::Shape(sf::Shape const&)]+0x4c): variable 'vtable for sf::Shape' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
.objs\main.o:main.cpp:(.text$_ZN2sf8DrawableC2ERKS0_[sf::Drawable::Drawable(sf::Drawable const&)]+0xa): variable 'vtable for sf::Drawable' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status


hope you can help me

sorry for bad english.
Code: [Select]

11
Graphics / just draw a image, not a sprite
« on: November 17, 2008, 10:20:04 pm »
i have a question,

for example i want to make a tile-based game, so i have to draw a picture for each tile.

Creating a sprite for each tile, would be nonsense, so how do i just draw a image at a position if i dont need all informations a sprite includes


thx

Pages: [1]