Answer the question
In order to leave comments, you need to log in
How to compile .c to .exe using gcc?
The question is a continuation of this article , but is already addressed to those who sit on C. I have a .c file
I already converted it to a .o binary using gcc.
How can I further convert it to exe? It gives me an error:
undefined reference to `__imp_PyModuleDef_Init'
undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
if __name__ == '__main__':
# Мой код
Answer the question
In order to leave comments, you need to log in
https://habr.com/en/post/478124/
If undefined reference to and collect2.exe: error: ld returned 1 exit status - then you need to link something:
-lsomething
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question