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

Pages: [1]
1
General / After installing SFML Full SDK ver1.4: unusual Termination
« on: January 08, 2009, 10:43:27 pm »
Quote from: "klusark"
Are you using the vs2008 libs when your are using vs2005?


i use mingW and therefore the mingW libs are linked.

After some debugging, is am able to determine the error.

Code: [Select]
   sf::String success = sf::String("ERFOLG!",sf::Font::GetDefaultFont(),50.f);
    success.SetColor(sf::Color(255,255,255));


If i comment both lines, the program ist executable (thus the sf::shape doesnt act as in 1.3 during moving).

2
General / After installing SFML Full SDK ver1.4: unusual Termination
« on: January 08, 2009, 12:22:51 am »
I started a project, which used to run properly using 1.3, and i got a runtime error now:



how could it be?


note: i did no changes in the source, just installed 1.4.


EDIT: Code

SfShapeSpriteMove.cpp

Code: [Select]


/*
 * SfShapeSpriteMove.cpp
 *
 *  Created on: 05.01.2009
 *      Author: Meta
 */

#include <iostream.h>
#include <SFML/Graphics.hpp>
#include "SfShapeSpriteMove.h"
//#include "MyKoords.h"


int main(){

/*INITIALISIERUNGEN */

sf::RenderWindow App(sf::VideoMode(1024,748,32),"SFML Bewegung",sf::Style::Close, sf::WindowSettings(24,8,0));
    //App.SetBackgroundColor(sf::Color(0,0,0,255));
    App.SetFramerateLimit(60);

    //MyKoords myxysys(100,10,&App);

    sf::Shape spr1 = sf::Shape::Circle(500,375,25,sf::Color::Green,1,sf::Color::Black);


    sf::String success = sf::String("ERFOLG!",sf::Font::GetDefaultFont(),50.f);
    success.SetColor(sf::Color(255,255,255));


    while(App.IsOpened()){

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

//Abarbeitung des Events "CLOSE"
if((Event.Type==sf::Event::Closed))
App.Close();  //falls das X geklickt wurde, schließe App


//geradlinige Bewegungen mit je einer Pfeil-Taste, Move: float x float ---> void
if((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Up))
   spr1.Move(0,-10);

            if((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Down))
                spr1.Move(0,10);

            if((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Right))
            spr1.Move(10,0);
            if((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Left))
            spr1.Move(-10,0);

            /*TODO schräge Bewegungen mit mehreren Pfeil-Tasten, Move: Vector2f  ---> void
            hmm will nich so recht

            //falls das Event lautet "je beide Tasten gedrückt" ...
            if(((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Up))&&((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Right)))

            //...mache solange wie sie gedrückt sind
 while((App.GetInput().IsKeyDown(sf::Key::Up))&&(App.GetInput().IsKeyDown(sf::Key::Right)))
    //...einen Move
 {spr1.Move(sf::Vector2f(10,-10));App.Draw(success);}

if(((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Down))&&((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Right)))

while((App.GetInput().IsKeyDown(sf::Key::Down))&&(App.GetInput().IsKeyDown(sf::Key::Right)))
         {spr1.Move(sf::Vector2f(10,10));App.Draw(success);}

if(((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Down))&&((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Left)))

while((App.GetInput().IsKeyDown(sf::Key::Down))&&(App.GetInput().IsKeyDown(sf::Key::Left)))
      {spr1.Move(sf::Vector2f(-10,10));App.Draw(success);}

if(((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Up))&&((Event.Type==sf::Event::KeyPressed)&&(Event.Key.Code == sf::Key::Right)))

while((App.GetInput().IsKeyDown(sf::Key::Up))&&(App.GetInput().IsKeyDown(sf::Key::Left)))
   {spr1.Move(sf::Vector2f(-10,-10));App.Draw(success);}
                */

}

        App.Draw(spr1);


        /*Ausgabe der aktuellen Position von spr1 im Fenster auf die Standard Ausgabe*/
        float xs1 = spr1.GetPosition().x;
        float ys1 = spr1.GetPosition().y;


        std::cout<<"Circle spr1 drawed"<<endl;
        std::cout << "Position "<< "(" << xs1 <<","<< ys1 << ")" << endl;


        //myxysys.drawKoord();
App.Display(); //erschaffenes Fenster anzeigen
}

return EXIT_SUCCESS;
}







SfShapeSpriteMove.h
Code: [Select]
/*
 * SfShapeSpriteMove.h
 *
 *  Created on: 05.01.2009
 *      Author: Meta
 */

#ifndef SFSHAPESPRITEMOVE_H_
#define SFSHAPESPRITEMOVE_H_

/*Klassendeklaration*/
class SfShapeSpriteMove {
public:
SfShapeSpriteMove();
virtual ~SfShapeSpriteMove();
};

#endif /* SFSHAPESPRITEMOVE_H_ */

3
Window / Undefined Reference Errors
« on: December 15, 2008, 11:51:46 pm »
ah okay, i'll try tomorrow, reaction here by Edit.

EDIT:
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lC:\Dokumente und Einstellungen\Flo (Admin)\Desktop\privater Dev Stuff\SFML-1.3\lib\mingw\libsfml-window-s.a

but it exists there! >,<

Edit: what a weird mistake.. o,ô

4
Window / Undefined Reference Errors
« on: December 15, 2008, 05:39:23 pm »
You mean -d ?

I got a subproblem relating to libraries.
If i assign specific libs to the project (in the way Avency described)
i get "No such File" errors".
And if i assign a lib directory, nothing changes.

The main problem still exists; anyway big thanks for your help so far!

5
Window / Undefined Reference Errors
« on: December 14, 2008, 04:40:15 am »
Quote from: "Avency"
Did you add the libraries to the linker settings?

(Properties -> C/C++ Build -> Settings -> GCC C++ Linker -> Libraries)


Yes, i made it up now, but the same errors occured.


Quote from: "Wizzard"
Remember to define SFML_DYNAMIC if you're not using the static libraries.


Could you show me your hint more detailed, please?

6
Window / Undefined Reference Errors
« on: December 13, 2008, 03:19:31 pm »
Hey guys,

i got a problem compiling one of the Window-Tutorials (the very first writing a simple Window without Event-Handling).



So i got 3 'undefined Reference' Errors:

I calling the constructor

II calling the member-function "Display()" of "Window App"

III calling the Destructor ~Window()


But..why?

My IDE is Eclipse 3.4.0 (CDT Plugin) using the MinGW/GCC Toolchain (ver. unknown, probably 4.1/4.2).

I'm grateful for every helpful hint.



PS:  SeFu was used & google is my friend.

Pages: [1]