Can Windows call the WinMain function in a Static Library C++

690 views Asked by At

I have created a Static library which contains a WinMain() function that has to be called. I'm searching for some way to make windows call this function.

The reason is to have a solution without a Main Function, in which the user just inherit and fill some classes, and if he hits the play button, the solution runs.

Also, if you think my approach is not the best, tell me how you will afford this.

1

There are 1 answers

0
Barrnet Chou On

You could add #pragma comment(linker, "/entry:fn") to modify the entry function. Also, you could refer to Microsoft documents