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

Pages: [1]
1
Graphics / Re: Errors
« on: February 01, 2017, 08:12:10 am »
Code: [Select]
||=== Build: Debug in DirtyCraft (compiler: GNU GCC Compiler) ===|
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|10|warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11|
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\System\NonCopyable.hpp|67|error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is private|
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\Window\Window.hpp|57|error: within this context|
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\Graphics\RenderWindow.hpp|44|note: synthesized method 'sf::Window::Window(const sf::Window&)' first required here |
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\System\NonCopyable.hpp|67|error: 'sf::NonCopyable::NonCopyable(const sf::NonCopyable&)' is private|
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\Graphics\RenderTarget.hpp|51|error: within this context|
C:\Program Files (x86)\CodeBlocks\MinGW\include\SFML\Graphics\RenderWindow.hpp|44|note: synthesized method 'sf::RenderTarget::RenderTarget(const sf::RenderTarget&)' first required here |
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|10|note: synthesized method 'sf::RenderWindow::RenderWindow(const sf::RenderWindow&)' first required here |
||=== Build failed: 4 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
I got this, and redirect me ar 2 targets, Im sure they are visible in errors

EDIT:solved, I put it in a namespace, because I want my game to have only one window, and the sistem call it

2
Graphics / Errors
« on: February 01, 2017, 12:24:59 am »
So I started to make a system of derivable classes and making a derivable class for every room, like one class is for game, and another is the main menu. So I did something like this

Code: [Select]
private:
     sf::RenderWindow window(sf::VideoMode(800, 600), "Test");

Code: [Select]
||=== Build: Debug in DirtyCraft (compiler: GNU GCC Compiler) ===|
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|9|error: expected ')' before numeric constant|
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|9|error: expected ')' before numeric constant|
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|9|error: expected ';' at end of member declaration|
C:\Users\George\Desktop\C++\DirtyCraft\Sources\GameState.h|9|error: expected unqualified-id before numeric constant|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
So I dont get why I get this

3
Graphics / views?
« on: January 23, 2017, 08:00:35 pm »
So I got started, this library is lovely, but today I got a problem, how do I can move camera in 3d? In 2d I found a tutorial with views but in 3d? I serched, but I didnt found what I was looking for.

 And one more question, is better to organise scripts, is better to organise in multiple files with headers and things?? And make a class and derive it(I dont found why but I see lot of people do this.)

4
General / Re: OpenGL link?
« on: January 23, 2017, 02:26:59 pm »
Thank you, Laurent!

5
General / Re: OpenGL link?
« on: January 23, 2017, 01:28:40 pm »
I put in linker like this opengl32.lib and I got this cannot find -lopengl32.lib

6
General / Re: OpenGL link?
« on: January 23, 2017, 12:32:15 pm »
"You will then need to link your program to the OpenGL library. Unlike what it does with the headers, SFML can't provide a unified way of linking OpenGL. Therefore, you need to know which library to link to according to what operating system you're using ("opengl32" on Windows, "GL" on Linux, etc.). The same applies for GLU as well in case you plan on using it too: "glu32" on Windows, "GLU" on Linux, etc." and you said "they are part of compiler", so I use mingw, and I cant find anywhere in the compiler folder. Is there any place where I can download? Sorry, if I understand hard, but Im begginer after all.

7
General / OpenGL link?
« on: January 23, 2017, 11:24:46 am »
So I linked every thing, you can find in the library folder. And every thing works just fine, the problem appeared when I used #include <SFML/OpenGL.h> and I got errors undefined reference, I linked from every thing that come the zip when downloaded. I need to download a new library???

8
General / Re: Window not opening!?
« on: January 22, 2017, 10:26:47 pm »
I got it working, I deleted it and I put GCC 4.9.2 TDM (SJLJ) - 32-bit. I had GCC 6.1.0 MinGW (DW2) - 32-bit.

But my question whats the difference between these two? And Why the old one wasnt working?

9
General / Window not opening!?
« on: January 22, 2017, 06:03:26 pm »
So today, I opened code::blocks, to continue my project... But there was a problem

Code: [Select]
Process returned -1073741511 (0xC0000139)   execution time : 0.005 s
Press any key to continue.
that is what the console says. I tried to make the a test in a new project, the same.
Code: [Select]
#include <iostream>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

using namespace std;
using namespace sf;

int main()
{
    RenderWindow window(VideoMode(640, 360), "DirtyCraft");

    while(window.isOpen())
    {
        Event e;
        while(window.pollEvent(e))
        {
            switch(e.type)
            {
                case sf::Event::Closed: window.close(); break;
            }
        }

        window.clear();

        window.display();
    }
    cout << "Hello world!" << endl;
    return EXIT_SUCCESS;
}

And after that I putted in the new project, the dlls, I put debug first, same, I put the release, and both, the same... :'( :'( :'(. Libraries are linked(I linked the entyre folder that comes with sfml in lib.)


10
General / Re: I can't get my program working
« on: January 17, 2017, 10:20:59 am »
Solved. I was so confused... I knowed I linked them... but I don't understand why codeblocks forget the links. Thank you all, have a nice day/night!

11
General / Re: I can't get my program working
« on: January 17, 2017, 09:44:55 am »
The problem is they are linked... because it worked befor cut it in more functions, and make it pointer... it worked perfect

so i did like this
Code: [Select]
window = &(sf::RenderWindow(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings));and the errors have simplified a lot!
Code: [Select]
||=== Build: Debug in DirtyCraft (compiler: GNU GCC Compiler) ===|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp||In function 'void Display::Init()':|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|error: taking address of temporary [-fpermissive]|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Solved.... code blocks.... I dont understand why it forget the links... Thank you! Have a nice day
but, still how I can solve this??

12
General / Re: I can't get my program working
« on: January 17, 2017, 09:24:18 am »
Code: [Select]
window = new sf::RenderWindow(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings); so this line is with problems for me!

Code: [Select]
||=== Build: Debug in DirtyCraft (compiler: GNU GCC Compiler) ===|
obj\Debug\Display.o||In function `ZN7Display4InitEv':|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|25|undefined reference to `_imp___ZN2sf6Window22setVerticalSyncEnabledEb'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|31|undefined reference to `_imp___ZN2sf6Window5closeEv'|
obj\Debug\Display.o||In function `ZN7Display3RunEv':|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|77|undefined reference to `_imp___ZN2sf6Window5closeEv'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|73|undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|84|undefined reference to `_imp___ZN2sf6Window7displayEv'|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|70|undefined reference to `_imp___ZNK2sf6Window6isOpenEv'|
||error: ld returned 1 exit status|
||=== Build failed: 10 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|
these are the errors! So 24 is
Code: [Select]
window = new sf::RenderWindow(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings);  and the rest are functions of the class, reffered by ->.

but if I put * to RenderWindow
Code: [Select]
        window = new sf::RenderWindow*(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings);
I get less errors

Code: [Select]
||=== Build: Debug in DirtyCraft (compiler: GNU GCC Compiler) ===|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp||In function 'void Display::Init()':|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|error: new initializer expression list treated as compound expression [-fpermissive]|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|warning: right operand of comma operator has no effect [-Wunused-value]|
C:\Users\George\Desktop\C++\DirtyCraft\Display.cpp|24|error: cannot convert 'sf::ContextSettings' to 'sf::RenderWindow*' in initialization|
||=== Build failed: 2 error(s), 2 warning(s) (0 minute(s), 0 second(s)) ===|
the interesting fact is that all the errors are now on 24 who is window = new...

If this is not enought to solve the problem, tell me, what is missing and I will give it

13
General / Re: I can't get my program working
« on: January 17, 2017, 08:27:55 am »
I get some weird compiler errors. I use MinGW as compiler. And all the block me is, how I give it the value of a constructor. And I thinked to create a temp class with new... but it didn't. And I dont know how I can make that = work without any compiler errors

14
General / I can't get my program working
« on: January 16, 2017, 09:43:37 pm »
So I tryed to make a global class of renderwindow and manage it from a function. I want to make functions separate, later I will do a multy window system, that can be helpful.(I use c++, sfml and glew)

So firstly I initialized it global.
Code: [Select]
sf::RenderWindow *window;
Code: [Select]
     void Init()
    {

        int Width = 640, Height = 480;
        sf::ContextSettings settings;
        settings.depthBits = 24;
        settings.stencilBits = 8;
        settings.majorVersion = 3;
        settings.minorVersion = 3;
        settings.attributeFlags = sf::ContextSettings::Core;
        window = new sf::RenderWindow(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings);
        window->setVerticalSyncEnabled(true);
        //window.setFramerateLimit(60);

        if(GLEW_OK != glewInit())
        {
            std::cout << "Failed to run Glew";
            window->close();
        }
    }
and I try to manage it from this. my main problem is:
Code: [Select]
window = new sf::RenderWindow(sf::VideoMode(Width, Height), "DirtyCraft", sf::Style::Titlebar | sf::Style::Close, settings);I want a fast reply, because I need to start my project faster, because I need to finish it in like 3 months.

Pages: [1]
anything