FFVS-Project-Generator icon indicating copy to clipboard operation
FFVS-Project-Generator copied to clipboard

Wrapper Files

Open softworkz opened this issue 2 years ago • 1 comments

Hi,

quick question: is there a way to avoid the generation of those _wrap.c files? Why do they exist?

Thanks, sw

softworkz avatar May 23 '22 06:05 softworkz

To answer my own question:

This requires disabling uwp and winrt, then those wrapper files won't be generated.

But it didn't work by specifying --disable-winrt --disable-uwp on the command line. It only worked after I had disabled these two in the code (where the defaults are set).

softworkz avatar May 23 '22 14:05 softworkz

The wrapper files are auto generated whenever there is a source file whos inclusion in the project depends on a config value that is not clearly defined. For instance many config options are disabled when winrt/uwp is being used and as such at the project scope it cant be determined if the file should be included or not (as it depends on whether a winrt or non-winrt project configuration is selected). So the Generator wraps them in a file and surrounds them in the conditional config option. This ways those files are not compiled should the project configuration change and require that functionality.

Most of the time this occurs in winrt but it can also occur in other situation depending on the configuration passed to ffvs.

Sibras avatar Sep 03 '22 15:09 Sibras

Thanks for fixing and a big thank you for providing and maintaining this great project!

softworkz avatar Sep 03 '22 19:09 softworkz