I am generating code for Clarion based on a C# project, one of the things it does it generate a .inc and .clw file - the .clw references the .inc with an
include statement - both are added to the project using “add”->“Existing Item” - but it doesn’t detect the .inc file during compilation and throws the following error:
The thing is, both are included:
But both files reside outside the project folder as these are generate on build of an external project - it does load the CLW but fails to find the INC.
Any solutions to this? Except messing with Hardlinks etc?
The .inc file is not directly compiled
Therefore it’s not typically added to a .cwproj
However you can add files to .sln
Or possibly to the .cwproj but marked as compile type = none
Note classes with ,module and ,link attributes do not need to be added to the .cwproj either in order to be compiled.
Can the files be found via the redirection file? Maybe a local redirection file in your project folder would work out for you.
In LibSrc the CwUtil.INC / .CLW and matching template CwUtil.TPW are a good example.
- In the Global Includes have:
- The CwUtil.Inc file has line
PRAGMA('compile(CWUTIL.CLW)') to compile the CLW in the Build so there is no need to add the CLW to the CwProj
The files will need to be findable using the RED file. Or I suppose it is possible to have full path names, I don’t like to do that because it can be hard to move or copy. You can have a project specific RED file.