Why Can't Compiler Find Include File?
TurnipTruck
Posts: 1,485
Greetings,
I don't work with includes much. I have:
Any suggestions?
Thanks.
I don't work with includes much. I have:
INCLUDE 'My Include File 2.00'in the mainline of the program. "My Include File 2.00.axi" exists in the same directory as the mainline. I get a pre-processor error stating that the include file could not be found.
Any suggestions?
Thanks.
0
Comments
I think the dot in 2.00 is throwing the compiler off and I’m guessing it’s looking for a .00 file instead of .axi
If I change the INCLUDE line
From:
My Include File 2.00
TO:
My Include File 2.00.axi
Then it finds the include.
I was working on a project today when for no apparent reason, my module quite working.
I beat and banged on the thing for the rest of the afternoon with no luck. It was as if the compiler had lost its ability to see (or care) about the module. I could even delete the file from the directory tree without it erroring out. However, the variables in the module were there to be seen in the debugger. I could even change their values. The data_event in the module wouldn't fire (online event)
If I changed the file name or module instance it would get mad but would compile if I put it all back even with the file removed from the project. I tried deleting all the .tko s and whatnot to try and force it to recreate them which it did.
I gave up on it figuring on hitting it again tomorrow with a fresh set of eyes.
One note though, if you do a Build instead of a straight Compile then the compiler will compile any .axs file it finds in the workspace module folder (even if it’s not called for in code) and then will compile the system.
If you only include the .tko files for any module in the workspace then a Build and Compile will yield the same results.
My personal preference is to only include the .tko files in the workspace module folder. If I’m writing a module I’ll compile it standalone and then leave it alone. This keeps the integrity of the date stamp of the modules intact in case I hit the build button instead of the compile button. There’s no reason to compile every module every time when compiling the system.
for the record, here's what fixed it??????
There were two define_module-s. The non-working one was below the first.
i put the non-working one above the working one, making it first in the list, compiled, uploaded and it all works now. So, I put the formerly non-working one right back where it was , compiled, uploaded and it all works now.
Very strange...