Compile .exe without a .c file or .gcc

John 0 Reputation points
2023-07-19T18:47:02.49+00:00

Hello, so i want to make a .exe program in notepad and i need to compile it. Google says to compile the .c file but i don't even have one. The tag is random cause there was no tag related to this.

Developer technologies | C++
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-07-20T07:33:00.57+00:00

    but i don't even have one

    Without any source code you can't compile anything and so you can't create an application/executable (EXE).

    0 comments No comments

  2. Minxin Yu 13,501 Reputation points Microsoft External Staff
    2023-08-25T06:06:51.87+00:00

    Hi,

    You can edit the code in notepad and change the entension to .c And use command such as gcc -o myprogram.exe main.c

    to generate the exe. Replace main.c with your source file.

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.