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

Pages: 1 2 [3] 4 5
31
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 01:33:45 pm »
I was thinking about that, but it says windows 32 bit only, and since I am running on a 64-bit system (CPU) I thought it might give problems in the future?

Anyways what I did (out of my head, dont shoot me if I dont tell it all right lol).

1. Unpacked it
2. Set my Path to my Qt Mingw folder (MS-DOS Prompt)
3. Started the cmake-gui.exe
4. Chose "MinGW Makefiles" and "Use default native compilers"

and that's basicly it, rest is known as just including it in your .pro file :)

I will download the pre-compiled version later today, to see if I can get that working if that is better :)

32
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 01:23:17 pm »
Wow, that sounds like "abracadabra" to me hahaha.
Anyways, the following result came up when consulting my prompt:



And what I downloaded, if you go to http://www.sfml-dev.org/download.php you see a download link for "SFML 2.0 snapshot". That's the one I downloaded :)

When you unpack it, the folder is something with the name "Laurent Gomila" in it ;)

33
General / Re: During startup program exited with code 0xc0000135
« on: June 25, 2012, 01:11:05 pm »
Hey Laurent,

thanks for your reply! I am still learning so sorry if I fail to provide all the needed information.

- I am on a Windows 7 64-Bit machine
- I am using Qt SDK (newest version)
- I have Microsoft Visual Studio 2010 Professional installed as well
- I dowloaded the SFML 2.0 Snapshot.
- I am using (I think) the Mingw 4.4 (Qt SDK).

Not sure what you mean with "which archive precisely did you download", and neither I have a clue how to paste the output of gcc -v. I will try to find it on google, if I can find it I will edit my post :)

34
General / During startup program exited with code 0xc0000135
« on: June 25, 2012, 01:01:01 pm »
Hello,

I got SFML working and running. But when I add the following line to my code:

sf::Http http;

I get an error "The program has unexpectedly finished." in my Application output.
I tried using Breakpoints and #defines but no output is visible.

When I run it in "debug" mode I get a pop-up with the error as described in this topic title.

When I just run my game (without the Http code) everything works, runs, debugs and compiles just fine.
I tried Google but no solutions there, and I cannot find what is wrong.

The error only comes when I try to use the Http code.

Anyone knows any solution or anything I can try?

My .pro file:
QT       += core gui

TARGET = project
TEMPLATE = app


SOURCES += main.cpp

HEADERS  +=

LIBS += -L"C:\\SFML\lib" -lsfml-graphics -lsfml-window -lsfml-system -lsfml-network

INCLUDEPATH = "C:\\SFML\\include"

35
General / Re: Check username/password through a PHP file
« on: June 24, 2012, 09:58:29 pm »
well, I am here for pointers (to learn) so I know what to search / look for and to learn ;)
thanks for your answers people, will look into it and do some research :D

What I do know is this:

The error starts at the following code:

sf::Http::Request request;

If I remove the following part:

Code: [Select]
sf::Http::Request request;
   
    request.setMethod(sf::Http::Request::Post);
    request.setUri("/login.php");
    request.setBody("username=GroundZero&password=test");

    sf::Http Http("www.site.com");
    sf::Http::Response Responce = Http.sendRequest(request);

Everything works fine.

When I use the sample code from 2.0 documentation

Code: [Select]
// Create a new HTTP client
 sf::Http http;

 // We'll work on http://www.sfml-dev.org
 http.setHost("http://www.sfml-dev.org");

 // Prepare a request to get the 'features.php' page
 sf::Http::Request request("features.php");

 // Send the request
 sf::Http::Response response = http.sendRequest(request);

 // Check the status code and display the result
 sf::Http::Response::Status status = response.getStatus();
 if (status == sf::Http::Response::Ok)
 {
     std::cout << response.getBody() << std::endl;
 }
 else
 {
     std::cout << "Error " << status << std::endl;
 }

I get the same error.

Breakpoints not showing the progress or what so ever when using debug mode... all I see is below here:



P.S. I know you can do the #if-not-defined cout stuff, but that sucks donkey nuts and wouldnt even work in this case :)

36
General / Re: Check username/password through a PHP file
« on: June 24, 2012, 07:17:57 pm »
Yeah but the debugged tells me nothing 9 out of 10 times, maybe cause lack of knowledge but... (ill edit my post later).

When I start program with the debugger it says:

During startup program exited with code 0xc0000135

So i cannot find any errors from the debugger :)

37
General / Re: Check username/password through a PHP file
« on: June 24, 2012, 04:22:08 pm »
I tried your code, but I am getting strange errors which dont make a clue (to me that is lol)...

#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Network.hpp>
#include <iostream>
#include <string>

int main()
{
    // message
    std::cout << "Hello world!" << std::endl << std::endl;

    // http request to verify username and password
    sf::Http::Request request;
    request.setMethod(sf::Http::Request::Post);
    request.setUri("/login.php");
    request.setBody("username=GroundZero&password=test");

    sf::Http Http("www.site.com");
    sf::Http::Response Responce = Http.sendRequest(request);

    std::string result = Responce.getBody();

    // let the user know if the login was accepted
    std::cout << result << std::endl;

    // end program
    return 0;
}

QT       += core gui

TARGET = project
TEMPLATE = app


SOURCES += main.cpp

HEADERS  +=

LIBS += -L"C:\SFML\lib" -lsfml-window -lsfml-graphics -lsfml-network -lsfml-system

INCLUDEPATH = "C:\SFML\include"

Error messages:
The program has unexpectedly finished.

Compile output:
Quote
WARNING: c:\Users\Angelo\Desktop\Projecten\Validate Username and Password\project\project.pro:17: Unescaped backslashes are deprecated.
WARNING: c:\Users\Angelo\Desktop\Projecten\Validate Username and Password\project\project.pro:17: Unescaped backslashes are deprecated.
WARNING: c:\Users\Angelo\Desktop\Projecten\Validate Username and Password\project\project.pro:17: Unescaped backslashes are deprecated.
C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Users/Angelo/Desktop/Projecten/Validate Username and Password/project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
g++ -mthreads -Wl,-subsystem,windows -o debug\project.exe debug/main.o  -L"c:\QtSDK\Desktop\Qt\4.7.4\mingw\lib" -lmingw32 -lqtmaind -LC:\SFML\lib -lsfml-window -lsfml-graphics -lsfml-network -lsfml-system -lQtGuid4 -lQtCored4 -LC:\OpenSSL-Win32_full\lib
mingw32-make.exe[1]: Leaving directory `C:/Users/Angelo/Desktop/Projecten/Validate Username and Password/project-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug'
16:20:35: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited normally.

38
General / Re: Check username/password through a PHP file
« on: June 23, 2012, 08:27:43 pm »
OMG so simple haha... thank you so much, your a life saver ;) <3

39
General / Re: Check username/password through a PHP file
« on: June 23, 2012, 08:02:50 pm »
Well, I have no clue how to do it, dont even have a clue in what direction I should check lol.
I asked on Qt forums but no answer, I tried several other C++ forums but no one is helping me out of giving me any points lol.

I would love to get some help from someone i.e. telling me how to do it (what functions I need) or if someone could write me a super simple sample script. Then I can just "tear it apart" and see what each command means and does :)

40
General / Check username/password through a PHP file
« on: June 23, 2012, 07:44:55 pm »
Dear readers,

I am building a game for which you need an account. It wouldnt be smart to put the database information (mysql) in the code it self, cause then people can see it and hack my database.

Instead I want the C++ code to send the filled in username and password to a PHP file i.e. www.mysite.com/login.php

The PHP will then return true or false (for example). Based on that, the C++ will say “logged in” or “username/password invalid”.

Unfortunately after 2 days of Google I still havent found out how to do this. I hope someone can tell me how to do this.

Best regards

p.s. if possible a sample code would be highly appreciated!

41
General / Re: Cannot add text to window
« on: June 23, 2012, 07:32:57 pm »
ugh... you are right, thanks so much for your answer lol :)
stupid actually I didnt notice, as I knew this (didnt touched C++ for a long time though)

Thanks for you help!

EDIT: Just a small question, it says "Failed to load font "arial.ttf" (failed to create the font face)".
I am using the Arial.ttf form my windows/fonts folder...

Should I give a static link i.e. C:\Users\MySelf\Desktop\Project\Arial.tff or something or is the file unusable ?

EDIT: I gave it the static links as I meantioned, now it is working :) thanks again all ;)

42
General / Re: Cannot add text to window
« on: June 23, 2012, 06:56:19 pm »
Thanks for your answer Laurent, my complete code is:

// include SFML headers
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

// include other headers
#include <string>

// custom headers
#include <userCharacter.h>
#include <collisionDetection.h>

// global settings
bool showSplashScreen = false;
bool isGameAvailable = false;
bool isGameExiting = false;
bool isGamePaused = false;
bool isShowingMenu = false;

// game title
sf::Font font;
font.loadFromFile("arial.ttf");
sf::Text text("GameName", font, 50);

// main loop
int main()
{
    // Create the main window
    sf::RenderWindow window(sf::VideoMode(800, 600), "GameName");
    window.setFramerateLimit(60);

    // Start the game loop
    while (window.isOpen())
    {
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                window.close();
        }



        // Clear screen
        window.clear();

        // Draw text
        window.draw(text);

        // Update the window
        window.display();
    }

    return 0;
}
 

my character header (not finished lol) is:
#ifndef USERCHARACTER_H
#define USERCHARACTER_H

class userCharacter{
private:
    std::string characterName;
    int characterLevel;
    float characterExperience;

public:
    userCharacter( std::string cName, int cLevel, float cExperience );
};

#endif // USERCHARACTER_H
 

best regards

43
General / Cannot add text to window
« on: June 23, 2012, 06:35:48 pm »
Dear readers,

when I use this code in SFML 2.0:

sf::Font font;
font.loadFromFile("arial.ttf");
sf::Text text("Crystallibrium", font, 50);

I receive the error:

expected constructor, destructor, or type conversion before '.' token

I cannot find a solution on Google, can anyone help me out please?


- Windows 7 Prof
- Qt SDK (newest)
- SFML 2.0

44
General / Re: LNK1104: cannot open file 'sfml-window.lib'
« on: June 22, 2012, 10:14:47 pm »
Oke, again one day later... still not working grr.... what I tried and have so far (someone please help me LOL)

my Tool chain says "Microsoft Visual C++ Compiler 10.0 (x86). I tried changing it to Mingw but that is impossible, it will only accept the MSVC Compiler.

I made a new project and now the settings are this by default:



Now it does not tell me it cannot find the SFML items, but it gives me the following error:

Quote
Starting C:\Users\Angelo\Desktop\Projecten\Test\untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug\debug\untitled.exe...
testC:\Users\Angelo\Desktop\Projecten\Test\untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug\debug\untitled.exe exited with code 0

Starting C:\Users\Angelo\Desktop\Projecten\Test\untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug\debug\untitled.exe...
The program has unexpectedly finished.
C:\Users\Angelo\Desktop\Projecten\Test\untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug\debug\untitled.exe exited with code -1073741515

The Compile output:
Quote
22:01:38: Running build steps for project untitled...
22:01:38: Configuration unchanged, skipping qmake step.
22:01:38: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
c:\qtsdk\desktop\qt\4.8.1\mingw\bin\qmake.exe -spec c:\QtSDK\Desktop\Qt\4.8.1\mingw\mkspecs\win32-g++ CONFIG+=declarative_debug -o Makefile ..\untitled\untitled.pro
WARNING: c:\Users\Angelo\Desktop\Projecten\Test\untitled\untitled.pro:11: Unescaped backslashes are deprecated.
WARNING: c:\Users\Angelo\Desktop\Projecten\Test\untitled\untitled.pro:11: Unescaped backslashes are deprecated.
WARNING: c:\Users\Angelo\Desktop\Projecten\Test\untitled\untitled.pro:11: Unescaped backslashes are deprecated.
C:/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `C:/Users/Angelo/Desktop/Projecten/Test/untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include" -I"c:\Program Files (x86)\SFML\include" -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\include\ActiveQt" -I"debug" -I"..\untitled" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.1\mingw\mkspecs\win32-g++" -o debug\main.o ..\untitled\main.cpp
g++ -mthreads -Wl,-subsystem,windows -o debug\untitled.exe debug/main.o  -L"c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib" -lmingw32 -lqtmaind "-LC:\Program Files (x86)\SFML\lib" -lsfml-window -lsfml-graphics -lsfml-system -lQtGuid4 -lQtCored4
mingw32-make.exe[1]: Leaving directory `C:/Users/Angelo/Desktop/Projecten/Test/untitled-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug'
22:01:40: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited normally.

Can anyone tell me what the hell is wrong? im getting so frustrated after 4-5 days now pfff...

45
General / Re: LNK1104: cannot open file 'sfml-window.lib'
« on: June 22, 2012, 01:03:02 am »
yeah I tried that, didnt work lol, tells me it cannot find bla bla bla (what I first posted) lol :)

Pages: 1 2 [3] 4 5
anything