V
V
Vlad2022-02-17 17:05:22
Python
Vlad, 2022-02-17 17:05:22

How can I compile Cython (C) code so that it doesn't open a console when I run it?

I have a program in Cython (.pyx):

import tkinter


cdef public void Function():
    root = tkinter.Tk()
    root.mainloop()


if __name__=='__main__':
    Function()


I am translating the code to C ("python -m cython test.pyx --embed") and compiling it ("gcc -mconsole -DSIZEOF_VOID_P=8 -DMS_WIN64 file_path -IE:\Programms\Python\include -LE:\Programms\Python \libs -lpython310 -o main")

But when I open the application, I get a console:
620e56008d752899695739.png

How can I remove this console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2022-02-17
@MoscowDriftss

They themselves asked to create a console (-mconsole), try -mwin32 -mwindows

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question