Closed IngwiePhoenix closed 9 years ago
Turns out the const
keyword infront of the actual data causes issues on all systems. There is no issue with the ...End
and ...Size
symbols, but only with the ...Data
symbols. I have made a fork and removed the const keyword there.
extern "C" is what the script needs
You're using the tool wrong anyways. You're not suppose to include a header file that uses INCBIN. You're suppose to use INCBIN in source files only and then reference data externally with INCBIN_EXTERN. This is documented.
I've used the header simply due to keeping things organized. It works out since that is only included at one place. I might change it later, but for now that simply seems to reduce typing duplicated things. ^^
I have almost completely ported my project to use incbin. However, I am struggling with C++.
I created a file called
scripts.rc
which simply contains:And within my main code:
That, on it's own, works. Its a cheaty hack so that I can use the three step build on all platforms. That is:
However, the
const
keyword is giving me issues. The...Data[]
symbols get all mangled with the name, and it turns out that this is why.For now, I have to find a way to work this out...