Import command not working perfectly in Beta?

BlitzMax Forums/BlitzMax Programming/Import command not working perfectly in Beta?

Hi,

Okay, a few things:

Your main file imports a '.bb', not a '.bmx'. Max is silently ignoring this, which is a bit naughty and will be fixed.

Also, your ImportAllSources imports stuff from 'Include/' - but Import works relative to the file's directory so it ends up looking for 'Include/Include/blah'!

Finally, Imports can not be 'cyclic'. The idea is for files to import just what they need (ie: Universe should Import Sector if it needs it) so your 'ImportAllSources' approach is likely to eventually fail.

The easiest way around this is simply to use Include instead of Import in IncludeAllSources. However, you will not get the benefit of faster compile times this way.