How to create an executable file from c source files?

There are several files with .c anf.h extensions (cmdline.c cmdline.h core.c core.h, etc.) in the src directory, there is also one “MakeFile” file without extension. Is it possible to create these source files in some executable file on Windows 7 (64 bits)? I think I need to download compilers for C or some sdks correctly?

+3
source share
3 answers

Yes.

You need:

  • download and install the C / C ++ compiler (I recommend the TDragon MinGW distribution ),
  • PATH ( ); , cmd.exe gcc -v mingw32-make -v, , ,
  • cmd.exe, , Makefile, mingw32-make.

. , .


Update:

, MSys. , make ( mingw32-make).

CreateProcess, PATH. - :

  • cmd
  • set PATH=c:/mingw32/bin;c:/msys/1.0/bin ( , , )
  • , : , make. , - .

BTW - MinGW MSys .

+3

Windows. , . Visual Studio ( 2008 , ) Makefile. .. make .

, ... Makefile, .

'cygwin'

++ Windows, GCC, Windows. - , linux (.sh) ?

0

, C sdks ?

, , , . makefile. Makefile make GNU, , , Borland Make MS NMake. , make , IDE, Visual ++ 2010 Express.

, , , . , , , .


[EDIT]

, , , , , , GNU make, *.c src .

, BSD sockets Linux. Windows API, WinSock ( BSD Sockets), Cygwin ( ). Linux, , , . , , , , ?

, , Linux, , Windows. .

Also, looking at the code, I would suggest a few caveats, this is not the best quality code. This may be unfair, but one obvious flaw and indication if inexperience is the lack of inclusion of guards in the headlines.

0
source

Source: https://habr.com/ru/post/1777188/


All Articles