Waitrud Weber’s blog

things and reminders for memories

Windows make 000

The file systems between Windows and Linux are different.
MinGW can have permission on mingw console.
On Windows PowereShell we can not link libraries under MinGW/lib because we can not have the above permision.

> mingw32-make all
mingw32-g++ array_counter.o winmain_001.o -Wall -O3 -I C:\MinGW\include\ -L C:\MinGW\lib -l gdi32 -mwindows -o winmain_000.exe
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find C:\MinGW\lib: Permission denied
collect2.exe: error: ld returned 1 exit status
Makefile:21: recipe for target 'winmain_000.exe' failed
mingw32-make: *** [winmain_000.exe] Error 1
>

mingw32-g++ itself can link objects like the following.

> mingw32-g++ array_counter.o winmain_001.o -Wall -O3 -I C:\MinGW\include\ -L C:\MinGW\lib -l gdi32 -mwindows -o winmain_000.exe
>

https://github.com/gnu-mcu-eclipse/windows-build-tools/releases

Download zip archive and decode arbitrary folder and use make.exe.

> C:\aaa\bin\make.exe all
mingw32-g++ -Wall -O3 -o array_counter.o -c array_counter.cpp
mingw32-g++ -Wall -O3 -o winmain_001.o -c winmain_001.cpp
mingw32-g++ array_counter.o winmain_001.o -Wall -O3 -I C:\MinGW\include\ -L C:\MinGW\lib -l gdi32 -mwindows -o winmain_000.exe
>

 

Tnak you for your reference :D