Is CodeBlocks supposed to automatically know to link a .cpp file if the matching .h file is #included?
I have a redgloves.h file in the project with this line:
extern const unsigned char RedGloves_png[5];
And a redgloves.cpp file in the project with this line:
const unsigned char RedGloves_png[5] = {48,49,50,51,52};
And a main.cpp file in the project with these lines:
#include "redgloves.h"
wxMemoryInputStream istream(RedGloves_png, sizeof RedGloves_png);
When I attempt to compile it throws the error "undefined reference to RedGloves_png". If I cut the line from RedGloves.cpp and put it into the RedGloves.h file, then everything compiles without error. I don't think I should have to move it out of the RedGloves.cpp file.