Closed Tricky1975 closed 8 years ago
I now have this on the latest build of bcc. Maybe it happened earlier as I only had a version about 2 or 3 commits before this one. For me it looks as though the main module name is missing from the variable in the .c file for IncBin data variable.
For eg... the IncBin data is loaded inside a file named
mod/warp.mod/warpengine.mod/defaultshaders.bmx
The definition for the Incbin data in the associated incbin.h file is
_bb_warp_warpengine_defaultshaders_ib_1
but in the .c file that #includes the incbin.h the code is trying to use
_bb_warpengine_defaultshaders_ib_1
Note that the warp part is missing from the usage of the variable name. Edited to try to correct the text formatting
I must be doing something wrong, as I am unable to replicate this.
Odd.... (I forgot to mention that the BMax source I provided likely uses modules I wrote myself located here. All of them should be NG compatible now).
Even stranger too is that I can't reproduce this either :/ Maybe I had a bcc and a bmk from 2 different commits or something because I can't get this to bug at all now no matter what I try.
The only way I can reproduce this is to compile one of the module files, in error, thinking its the main file, then when compiling the real main app file it causes this issue, other than that I can't reproduce it. Maybe that's what I did at the time too, but I don't remember doing that. I usually have the 'Lock Build File' set to the main file but sometimes I've noticed that its not set, so maybe...
Doing such things in vanilla BMX leads to trouble too
Only ways to circumvent such a "faulty cache hit" is doing a rebuild-complete-code-base on every compile ... or to give the "mainfile" (the one getting initially compiled) a special stamp in the precompilation-filenames ... so when things get compiled they only use the cached variant if they were used in the same way as before.
Dunno about things like additionally linkef in sources (file1 precompilate does not import file2 but contains info about it as fileMain imported both... ).
Unable to replicate. If it's still an issue, open a new issue.
I am currently coding an RPG using BlitzMax original. I have a separate tool I coded to set up the enemies the player will meet. I used this tool to try out BlitzMax NG (it works if "Vanilla" and it's not that important this tools works in NG, I only did this for testing), and I got this error:
Now I only know the basics of C, this code was actually generated by BlitzMax NG, I shall throw a zip file with the source code in this issue so we can figure out if this is my fault or a bug in the translation to C. The full generated code in C for this file is this:
This zip file contains the original BlitzMax code
(I did do this on Mac compiling to Mac)