Problem with importing files (includes)

BlitzMax Forums/BlitzMax Programming/Problem with importing files (includes)

DH(Posted 2005) [#1]
Trying to use the import <file> so that I may take advantage of the whole project precompile thingy however:

Import "compiler.bmx"
Import "Stack_class.bmx"


Under the compiler.bmx I have defined type PCode

It works fine for everything in compiler.bmx, however when i try to use it in Stack_Class.BMX it shoots me an error saying that pcode is undefined.

Are there rules by which I can use import? Does the code not cross?

I tried definining it also in Stack_Class.BMX however then it gives me an error about pcode being a duplicate identifier.

Any thoughts?


Dreamora(Posted 2005) [#2]
You need a better file splitting design:

Put pcode in its own bmx and import it to both or make the class pcode within a private block of the bmx