ammer icon indicating copy to clipboard operation
ammer copied to clipboard

Is it possible to use minGW/gcc on windows?

Open Xephobia opened this issue 5 years ago • 6 comments

Hello, i don't want to install vsbuild tools because it's an imense bloat, can i use gcc?

Xephobia avatar Jul 07 '20 13:07 Xephobia

Yes, this should be fine. I'm not sure it has been tested before! You can use -D ammer.msvc=no to disable MSVC compilation (and assume GCC compilation). Let me know how it goes!

Aurel300 avatar Jul 07 '20 13:07 Aurel300

well i tried compiling the lib in the sample and i got this make -f Makefile.win cl /c adder.c process_begin: CreateProcess(NULL, cl /c adder.c, ...) failed. make (e=2): Le fichier spÚcifiÚ est introuvable. mingw32-make: *** [Makefile.win:7: adder.obj] Error 2

Using MinGW

Xephobia avatar Jul 07 '20 16:07 Xephobia

and for using visual studio what composent need to be installed? the system can't found nmake, j installed MSCV and c++ tools for cmake

(edit : it seems that my install has not correctly put bin folder on MSCV to path)

Xephobia avatar Jul 07 '20 16:07 Xephobia

when using nmake i got this error nmake /F Makefile.win

Microsoft (R) Program Maintenance Utility Version 14.26.28806.0 Copyright (C) Microsoft Corporation. All rights reserved.

    cl /c adder.c

Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x64 Copyright (C) Microsoft Corporation. All rights reserved.

adder.c adder.c(1): fatal error C1034: stdio.h: no include path set NMAKE : fatal error U1077: 'd:\visualstudio\VC\Tools\MSVC\14.26.28801\bin\Hostx64\x64\cl.EXE' : return code '0x2' Stop.

Xephobia avatar Jul 07 '20 16:07 Xephobia

So I think the Makefile.win file in the sample project is intended to be used by MSVC's nmake. The MSVC switch in ammer is about the generated makefiles, not the one that is already provided. But now that you have MSVC installed, these should work. The include path error might be because you're not using the command prompt provided by MSVC? When you install MSVC, it adds a "developer prompt" accessible through the start menu; the prompt should set up the paths correctly.

Aurel300 avatar Jul 07 '20 18:07 Aurel300

ho ok

Xephobia avatar Jul 07 '20 19:07 Xephobia