So here's what's happening:
In the beginning, there was one main source file. It compiled in a few seconds, but it was ~1000 lines long, so I began to split it into separate .h/.cpp combinations. The good news was that my main source's length is now ~500 lines, but the bad news is that I can't completely compile/link it.
So I've been at it for a while, but it hasn't gotten any better.
Here's an overview (or no overview):
There are four source files:
- corbit.cpp (main), 
- initialization.cpp (initialize vector of entities), 
- entity.cpp (entity class file), 
- display.cpp (HUD and camera class file). 
Main includes all other source files, as "display.h". Also, (for example) allegro.h.
display.cpp includes "entity.h" (with the #ifndef ENTITY_H guard thing), and "display.h", as well as (for example) allegro.h
entity.cpp includes "entity.h"
initialization.cpp includes (again with the #ifndef guard) "entity.h", as well as "initialization.h"
When I hit compile in Codeblocks, using GCC, it opens up locale_facets.tcc (anyone know what that is?) as an empty file. It also gives me two error messages, as follows:
- corbit.o In function 'ZNSt6vectorIP10physical_tSaIS1_EE5clearEv' 
- display.o: [project directory]..\lib\gcc\mingw32\3.4.5........\include\c++\3.4.5\bits\locale_facets.tcc (line 2497) (first defined here) <-- highlighted red 
and
- corbit.o In function 'ZNSt6vectorIP10physical_tSaIS1_EE5clearEv' 
- display.o: [project directory]..\lib\gcc\mingw32\3.4.5........\include\c++\3.4.5\bits\locale_facets.tcc (line 2497) (first defined here) <-- highlighted red 
, which look identical. In my main I have declared
std::vector<physical_t*> entity;
(physical_t is the entity class), which might have something to do with the first message.
In each .h file I have
#ifndef FILENAME_H
#define FILENAME_H
[declarations]
#endif
And whenever I include a header that doesn't correspond with the .cpp file I'm including it in, I enclose it in
#ifndef FILENAME_H
#include "filename.h"
#endif
I do have different .cpp files including iostream, math.h, allegro.h, and things like that, so that the functions they are defining can compile without syntax errors.
Using Windows, codeblocks, gcc. I can't think of anything else. Help would be appreciated!
 
     
    