Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Manually compiling from CMD... [Windows]  (Read 1208 times)

0 Members and 1 Guest are viewing this topic.

digimikeh

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Manually compiling from CMD... [Windows]
« on: February 14, 2021, 05:28:16 pm »
SOLVED! Please remove.


Hi!..

I want to use VIM and need to manually compile, i have downloaded GCC 7.3.0 MinGW (DW2) - 32-bit - 2.5.1 version, but i get some errors while compiling an example:

Code: [Select]
C:\Users\simicarli\Dropbox\U7\Games\Elevatorman>"..\..\Otros\Plantillas\G_SFML_Plantilla\mingw32\bin\mingw32-make.exe" -j4
C:/Users/simicarli/Dropbox/U7/Otros/Plantillas/G_SFML_Plantilla/mingw32/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'C:/Users/simicarli/Dropbox/U7/Games/Elevatorman'
g++ -Wl,-s -Wl,-subsystem,console -mthreads -o release\Elevatorman.exe release/main.o  -Lsfml\win\lib -Lsfml\win\bin
release/main.o:main.cpp:(.text.unlikely+0x28): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
release/main.o:main.cpp:(.text.unlikely+0x46): undefined reference to `_imp___ZN2sf5ShapeD2Ev'
release/main.o:main.cpp:(.text.unlikely+0x52): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
release/main.o:main.cpp:(.text.startup+0x81): undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
release/main.o:main.cpp:(.text.startup+0xa9): undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
release/main.o:main.cpp:(.text.startup+0xeb): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
release/main.o:main.cpp:(.text.startup+0x128): undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
release/main.o:main.cpp:(.text.startup+0x12d): undefined reference to `_imp___ZN2sf5Color5GreenE'
release/main.o:main.cpp:(.text.startup+0x13f): undefined reference to `_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
release/main.o:main.cpp:(.text.startup+0x158): undefined reference to `_imp___ZNK2sf6Window6isOpenEv'
release/main.o:main.cpp:(.text.startup+0x166): undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
release/main.o:main.cpp:(.text.startup+0x1b3): undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
release/main.o:main.cpp:(.text.startup+0x1c5): undefined reference to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
release/main.o:main.cpp:(.text.startup+0x1ca): undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
release/main.o:main.cpp:(.text.startup+0x1e6): undefined reference to `_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
release/main.o:main.cpp:(.text.startup+0x1f5): undefined reference to `_imp___ZN2sf6Window7displayEv'
release/main.o:main.cpp:(.text.startup+0x208): undefined reference to `_imp___ZN2sf6Window5closeEv'
release/main.o:main.cpp:(.text.startup+0x212): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
release/main.o:main.cpp:(.text.startup+0x230): undefined reference to `_imp___ZN2sf5ShapeD2Ev'
release/main.o:main.cpp:(.text.startup+0x23c): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile.Release:68: release/Elevatorman.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/simicarli/Dropbox/U7/Games/Elevatorman'
mingw32-make: *** [Makefile:45: release] Error 2

i have sfml bin and lib folders inside my project root folder...

My first approach is that i was using Mingw81 so i downloaded 7.3.0 but still the same...
Seems that ming make is not recognizing lib and bin folders, ...


My cpp main.cpp is:
#include <SFML/Graphics.hpp>

int main(){
        sf::RenderWindow window(sf::VideoMode(200, 200), "OK!");
        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;
}
 
« Last Edit: February 14, 2021, 07:31:33 pm by digimikeh »

 

anything