PVRShell has winmain


The powerVR SDK has the winmain included in the PVRShell.cpp which makes me either have my renderer module to be in the .exe project or end up as a static lib (all the provided samples are static lib projects).

I want to separate out my renderer into a dynamic lib. But at the same time I would like to use the PVR tools which must be compiled with it and this makes it hard to separate it out from the PVRShell.cpp which includes winman and ends up in the .exe project.

It would have been better if winmain was separated from PVRShell. Or is there an easy way I am missing to understand :|

Hope I made sense :) Please let me know and I will try explaining in detail.


mkandula2011-08-31 15:13:05

If you wanted to use the Shell in a dynamic library on Windows, you could replace the WinMain with a your own entry point(e.g. DllMain).

There is no dependance between the Tools and the Shell. You can compile the Tools as a static or dynamic library and use it however you need to.

THanks for the reply.

>you could replace the WinMain with a your own entry point(e.g. DllMain)

Very true !! But I request if the .cpp file from the PVR SDK can include a define like _PVRDLL etc and toggle between winmain and dllmain, it will be good :slight_smile: