1
C / Using VSC + gcc for my CSFML Project
« on: December 26, 2023, 08:16:40 am »
Hi,
I need to use VSC + gcc (Mingw on a Windoes System) for my CSFML-Project.
I have installed MSYS2 on my Windows 11 PC and have dowloaded CSFML 2.5.1 Visual C++ / GCC - 64-bit.
Running gcc after having configured everthing in tasks.json
gcc is envoked like this:
gcc.exe -fdiagnostics-color=always
-o C:\Users\mboum\Documents\GitHub\breakout\breakout.exe
-IC:\Users\mboum\Documents\GitHub\breakout\CSFML\include\
-LC:\Users\mboum\Documents\GitHub\breakout\CSFML\lib\gcc\
-lcsfml-graphics -lcsfml-system -lcsfml-window -lcsfml-network -lcsfml-audio
I get the following error message:
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o): in function `main':
C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crtexewin.c:67:(.text.startup+0xbd): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
Any idea where I am wrong?
Regs Marcus
I need to use VSC + gcc (Mingw on a Windoes System) for my CSFML-Project.
I have installed MSYS2 on my Windows 11 PC and have dowloaded CSFML 2.5.1 Visual C++ / GCC - 64-bit.
Running gcc after having configured everthing in tasks.json
gcc is envoked like this:
gcc.exe -fdiagnostics-color=always
-o C:\Users\mboum\Documents\GitHub\breakout\breakout.exe
-IC:\Users\mboum\Documents\GitHub\breakout\CSFML\include\
-LC:\Users\mboum\Documents\GitHub\breakout\CSFML\lib\gcc\
-lcsfml-graphics -lcsfml-system -lcsfml-window -lcsfml-network -lcsfml-audio
I get the following error message:
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o): in function `main':
C:/M/B/src/mingw-w64/mingw-w64-crt/crt/crtexewin.c:67:(.text.startup+0xbd): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
Any idea where I am wrong?
Regs Marcus