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

Pages: [1]
1
General / Re: i got errors at compilation
« on: November 07, 2023, 09:55:28 pm »
I linked libraries as stated in the tutorial (lib prefix and .a extensions omited) and this is what i got :

-------------- Build: Debug in sfml (compiler: GNU GCC Compiler)---------------

g++.exe -LC:\Users\asus\Documents\SFML\SFML-2.6.1\lib -o bin\Debug\sfml.exe obj\Debug\lucru.o   C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-graphics C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-window C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-system
g++.exe: error: C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-graphics: No such file or directory
g++.exe: error: C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-window: No such file or directory
g++.exe: error: C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\sfml-system: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))

if i put the prefix and the .a extensions i got this :


-------------- Build: Debug in sfml (compiler: GNU GCC Compiler)---------------

g++.exe -LC:\Users\asus\Documents\SFML\SFML-2.6.1\lib -o bin\Debug\sfml.exe obj\Debug\lucru.o   C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\libsfml-graphics.a C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\libsfml-window.a C:\Users\asus\Documents\SFML\SFML-2.6.1\lib\libsfml-system.a
obj\Debug\lucru.o: In function `main':
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:6: undefined reference to `__imp__ZN2sf11CircleShapeC1Efy'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:7: undefined reference to `__imp__ZN2sf5Color5GreenE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:7: undefined reference to `__imp__ZN2sf5Shape12setFillColorERKNS_5ColorE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:9: undefined reference to `__imp__ZNK2sf10WindowBase6isOpenEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:12: undefined reference to `__imp__ZN2sf10WindowBase9pollEventERNS_5EventE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:15: undefined reference to `__imp__ZN2sf6Window5closeEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:18: undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:18: undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:19: undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:19: undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:20: undefined reference to `__imp__ZN2sf6Window7displayEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
obj\Debug\lucru.o: In function `sf::CircleShape::~CircleShape()':
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZN2sf5ShapeD2Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
20 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

 

2
General / Re: i got errors at compilation
« on: November 07, 2023, 08:56:59 pm »
oh my bad there is a win32 version for mingw !

3
General / Re: i got errors at compilation
« on: November 07, 2023, 08:48:09 pm »
Thank you for your help. It seems Mingw pakage is for 64 bits arhitecture CMake is also for 64 bits. Im on win32. Ill try to solve the prroblem, again thx for help

4
General / Re: i got errors at compilation
« on: November 07, 2023, 12:48:53 pm »

-------------- Build: Debug in sfml (compiler: GNU GCC Compiler)---------------

g++.exe -L"C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\lib" -o bin\Debug\sfml.exe obj\Debug\lucru.o   "C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\lib\sfml-graphics.lib" "C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\lib\sfml-window.lib" "C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\lib\sfml-system.lib"
obj\Debug\lucru.o: In function `main':
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:6: undefined reference to `__imp__ZN2sf11CircleShapeC1Efy'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:7: undefined reference to `__imp__ZN2sf5Color5GreenE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:7: undefined reference to `__imp__ZN2sf5Shape12setFillColorERKNS_5ColorE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:9: undefined reference to `__imp__ZNK2sf10WindowBase6isOpenEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:12: undefined reference to `__imp__ZN2sf10WindowBase9pollEventERNS_5EventE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:15: undefined reference to `__imp__ZN2sf6Window5closeEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:18: undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:18: undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:19: undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:19: undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:20: undefined reference to `__imp__ZN2sf6Window7displayEv'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
C:/Users/asus/Desktop/C++/sfml/lucru.cpp:5: undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'
obj\Debug\lucru.o: In function `sf::CircleShape::~CircleShape()':
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZTVN2sf11CircleShapeE'
C:/Users/asus/Downloads/SFML-2.6.0-windows-vc17-32-bit (1)/SFML-2.6.0/include/SFML/Graphics/CircleShape.hpp:41: undefined reference to `__imp__ZN2sf5ShapeD2Ev'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
20 error(s), 0 warning(s) (0 minute(s), 1 second(s))
 

5
General / Re: i got errors at compilation
« on: November 06, 2023, 09:48:32 am »
I followed the steps of the tutorial can't figure out what went wrong

6
General / Re: i got errors at compilation
« on: November 03, 2023, 08:29:18 am »
this is the program :
#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;
}

7
General / i got errors at compilation
« on: November 03, 2023, 08:27:26 am »
I installed sfml in code bloks and tryed to run the program in the tutorial, it gives me a bounch of errors at compilation :
 ||=== Build: Debug in sfml (compiler: GNU GCC Compiler) ===|
obj\Debug\lucru.o||In function `main':|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|5|undefined reference to `__imp__ZN2sf6StringC1EPKcRKSt6locale'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|5|undefined reference to `__imp__ZN2sf9VideoModeC1Ejjj'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|5|undefined reference to `__imp__ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|6|undefined reference to `__imp__ZN2sf11CircleShapeC1Efy'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|7|undefined reference to `__imp__ZN2sf5Color5GreenE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|7|undefined reference to `__imp__ZN2sf5Shape12setFillColorERKNS_5ColorE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|9|undefined reference to `__imp__ZNK2sf10WindowBase6isOpenEv'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|12|undefined reference to `__imp__ZN2sf10WindowBase9pollEventERNS_5EventE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|15|undefined reference to `__imp__ZN2sf6Window5closeEv'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|18|undefined reference to `__imp__ZN2sf5ColorC1Ehhhh'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|18|undefined reference to `__imp__ZN2sf12RenderTarget5clearERKNS_5ColorE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|19|undefined reference to `__imp__ZN2sf12RenderStates7DefaultE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|19|undefined reference to `__imp__ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|20|undefined reference to `__imp__ZN2sf6Window7displayEv'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|5|undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'|
C:\Users\asus\Desktop\C++\sfml\lucru.cpp|5|undefined reference to `__imp__ZN2sf12RenderWindowD1Ev'|
obj\Debug\lucru.o||In function `sf::CircleShape::~CircleShape()':|
C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `__imp__ZTVN2sf11CircleShapeE'|
C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `__imp__ZTVN2sf11CircleShapeE'|
C:\Users\asus\Downloads\SFML-2.6.0-windows-vc17-32-bit (1)\SFML-2.6.0\include\SFML\Graphics\CircleShape.hpp|41|undefined reference to `__imp__ZN2sf5ShapeD2Ev'|
||error: ld returned 1 exit status|
||=== Build failed: 20 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

Pages: [1]