Hmm... well, I use a single global struct to handle all the passing of data to other classes in my project, because I'm too lazy to make a "better" implementation.
I have another peculiar problem. It's involving the debug vs release build modes of Visual Studio. Debug mode works fine, but it's dependent on DLLs like msvcr100d.dll which only come with Visual Studio, not with the C++ redistributable. Also, from a quick google search, it says Debug mode doesn't optimize code.
On the other hand, Release mode throws a ton of errors. D:
1>Baseclass.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall TCODConsole::putChar(int,int,int,enum TCOD_bkgnd_flag_t)" (__imp_?putChar@TCODConsole@@QAEXHHHW4TCOD_bkgnd_flag_t@@@Z)
1>Baseclass.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall TCODConsole::setCharForeground(int,int,class TCODColor const &)" (__imp_?setCharForeground@TCODConsole@@QAEXHHABVTCODColor@@@Z)
1>Baseclass.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall TCODConsole::setCharBackground(int,int,class TCODColor const &,enum TCOD_bkgnd_flag_t)" (__imp_?setCharBackground@TCODConsole@@QAEXHHABVTCODColor@@W4TCOD_bkgnd_flag_t@@@Z)
1>Engine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TCODConsole::blit(class TCODConsole const *,int,int,int,int,class TCODConsole *,int,int,float,float)" (__imp_?blit@TCODConsole@@SAXPBV1@HHHHPAV1@HHMM@Z)
1>Engine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall TCODConsole::clear(void)" (__imp_?clear@TCODConsole@@QAEXXZ)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall TCODConsole::~TCODConsole(void)" (__imp_??1TCODConsole@@UAE@XZ)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TCODConsole::TCODConsole(int,int)" (__imp_??0TCODConsole@@QAE@HH@Z)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall TCODConsole::setDefaultBackground(class TCODColor)" (__imp_?setDefaultBackground@TCODConsole@@QAEXVTCODColor@@@Z)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class TCODColor const TCODColor::black" (__imp_?black@TCODColor@@2V1@B)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class TCODColor const TCODColor::yellow" (__imp_?yellow@TCODColor@@2V1@B)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TCODColor::TCODColor(int,int,int)" (__imp_??0TCODColor@@QAE@HHH@Z)
1>PODS.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall TCODColor::TCODColor(void)" (__imp_??0TCODColor@@QAE@XZ)
1>TCODEngine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TCODConsole::flush(void)" (__imp_?flush@TCODConsole@@SAXXZ)
1>TCODEngine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TCODConsole::setCustomFont(char const *,int,int,int)" (__imp_?setCustomFont@TCODConsole@@SAXPBDHHH@Z)
1>TCODEngine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TCODConsole::initRoot(int,int,char const *,bool,enum TCOD_renderer_t)" (__imp_?initRoot@TCODConsole@@SAXHHPBD_NW4TCOD_renderer_t@@@Z)
1>TCODEngine.obj : error LNK2001: unresolved external symbol _SDL_PollEvent
1>TCODEngine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl TCODSystem::setFps(int)" (__imp_?setFps@TCODSystem@@SAXH@Z)
1>TCODEngine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class TCODConsole * TCODConsole::root" (__imp_?root@TCODConsole@@2PAV1@A)
1>TCODEngine.obj : error LNK2001: unresolved external symbol _SDL_Quit
1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
1>C:\Users\Administrator\Documents\Visual Studio 2010\Projects\ASCII sandbox\Release\ASCII sandbox.exe : fatal error LNK1120: 20 unresolved externals
I can only make out gibberish Dx Any help?
Or ways to make a build that optimizes code and isn't dependent on debug libraries like the above-mentioned -d suffixed dll?
If not optimization, at least not being dependent.
I'm using libtcod and SDL, btw.