Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 9
If it's just some C code you downloaded then the exe is enough. But there are also externally linked libraries. If you have a look around in your "C:/Program Files" you will see a lot of .dll files, that sort of thing. Really depends on what you are doing.
9th Apr 2019, 10:07 AM
Schindlabua
Schindlabua - avatar
+ 7
It should, since the compiler and linker combine it all to an exe, right? Excited to hear more about details and pitfalls .
9th Apr 2019, 10:06 AM
HonFu
HonFu - avatar
+ 7
THE TRUMP AFAIK gcc is the gnu C compiler and does not contain libraries. The source code for stdio.h should be available with a standard Linux, MacOS (and I am guessing Windows) distribution/version and after compilation will be statically linked to form your executable.
9th Apr 2019, 1:06 PM
Sonic
Sonic - avatar
+ 5
What Sonic said. Chances are your exe is self-contained and you can send it off to another windows PC. The target PC does not need gcc installed. You can compile all your headers/libraries to .o files first and link them later to form a .exe if you choose to, or just do it all in one go straight from the source. Anyway the .exe has everything it needs.
9th Apr 2019, 1:26 PM
Schindlabua
Schindlabua - avatar