GCC .a Linking and BMax

BlitzMax Forums/BlitzMax Programming/GCC .a Linking and BMax

OK, I think there's something else getting in the way here. Because this DLL is so large, I've split all the bmx and cpp stuff into class-related files. So I have a .bmx and a .cpp for each class as well as one main bmx and one main cpp file which brings it all together.

The Main bmx file includes all the other bmx files and imports the main cpp file. The main cpp file #includes all the other CPP files. Is this the wrong way to go about it? It's all being compiled, but is it not being linked correctly?

If I import each CPP file individually, I get a bunch of errors about classes being undefined when they're not, so that way I would presumably have to #include all the headers in each individual CPP file which is both messy and prone to error, not to mention including the same thing more than once, bulking out the package if I'm not VERY careful.

What's the correct way to be structuring this?