"Can't find include file" error after upgrading to 2021.0

In our project file, we are using the Call a C function custom action. Since this requires using absolute paths and since we cannot guarantee all developers use the same path for their code repositories, we put the C file (and identically named header) in a folder, thus using a UNC path in the PB project to access the file on the network. This has been working for years but unfortunately seems to be broken after upgrading to PB 2021.0 since we now get the following compilation error:

<PATH>\bin\mainscript.c(24): fatal error #1035: Can´t find include file "\\<SERVER>\paquetBuilderScripts\updateEnvironment.h".
COMPILATION ERROR
A fatal error has occurred:
Compilation Failed for Script "<PATH>\bin\mainscript.c"
Compilation aborted; The package has NOT been created.
FATAL ERROR: Compilation Error: Compilation Failed for Script "<PATH>\bin\mainscript.c"

We noticed that using a local absolute path does not produce the issue, but we really need a fix to make this work again with UNC paths (being able to use relative paths could also help)

We also noticed the following in the change history:

  • New 64-bit edition of Paquet Builder available: this removes the 4 GB memory limit for 7-zip compression and it uses the latest 64-bit C compiler available (v10).

Could this issue be related to the new C compiler?

Thanks for your help, we are currently blocked since we can no longer build the project (we were previously using the hot fix for the timestamping issue)…

Yes, it’s the new C compiler that seems to no more handle this. Try to move the updateEnvironment.h file to the “C:\Program Files\Paquet Builder 2021\Compiler\Include” installation folder.

Hello,

After some additional tests with the provided C compiler, the following command seems to work with UNC paths if we add a pbcore.h header containing the declaration of the SetVar function used in our C script (we didn’t find any pbcore.h in the installation folder, so we assume it is generated on the fly when building):

C:\Program Files\Paquet Builder 2021\Compiler> .\pocc.exe /FoD:\test.o \\<SERVERNAME>\paquetBuilderScripts\updateEnvironment.c /I"C:\Program Files\Paquet Builder 2021\Compiler\Include" /I"C:\Program Files\Paquet Builder 2021\Compiler\Include\Win" /Ze

Since this is working when invoking directly the C compiler, do you have any idea why this no longer works when the C compiler is invoked by Paquet Builder?

Indeed, we need to be able to go on using this UNC path in order to avoid changing it everywhere.

Perhaps it would also help to be able to add the paths to .c files in the directive file as well, is that something that could be done?

Do you mean the C files to be compiled too?

Yes, we’d list them for instance either through the [Variables] or [General] section of the directive file or, even better, in a dedicated section which would be linked to the “Additional C Scripts” box in the GUI:

[Cscripts]
0=C:\myscriptsdir1\script0.c
1=D:\myscriptsdir2\script1.c
...