My goal is to have my engine and its third-party dependencies compile together into 1 lib file, so my games would just need to include the engine's include files and link against the .lib.
I've started work on it, and the engine compiles fine by itself into a .lib. However, when I create a test game that uses it, I get a bunch of linker errors. I'm using vs 2013.
The engine has the allegro game programming library as its sole dependency, which i'm trying to link to statically as well.
warning LNK4217: locally defined symbol _al_map_rgb imported in function "public: bool __thiscall AppLayer::initInstance(int,int)" (?initInstance@AppLayer@@QAE_NHH@Z) Engine\engine test\Engine.lib(app layer.obj) engine test
These warnings come up for the allegro functions i use in the engine's application layer, followed by
an error LNK2019: unresolved external symbol.
The test app looks like this:
#include "stdafx.h"
#include "../engine.h"
#pragma comment(lib, "Engine.lib")
int main(int argc, char* argv[])
{
return Engine(argc, argv); // initializes the app layer, draw window to screen
}
i have engine properties -> librarian -> set link dependencies to yes, but still no luck. Any suggestions on getting static libraries referencing other static libraries to play nicely with each other?
I've started work on it, and the engine compiles fine by itself into a .lib. However, when I create a test game that uses it, I get a bunch of linker errors. I'm using vs 2013.
The engine has the allegro game programming library as its sole dependency, which i'm trying to link to statically as well.
warning LNK4217: locally defined symbol _al_map_rgb imported in function "public: bool __thiscall AppLayer::initInstance(int,int)" (?initInstance@AppLayer@@QAE_NHH@Z) Engine\engine test\Engine.lib(app layer.obj) engine test
These warnings come up for the allegro functions i use in the engine's application layer, followed by
an error LNK2019: unresolved external symbol.
The test app looks like this:
#include "stdafx.h"
#include "../engine.h"
#pragma comment(lib, "Engine.lib")
int main(int argc, char* argv[])
{
return Engine(argc, argv); // initializes the app layer, draw window to screen
}
i have engine properties -> librarian -> set link dependencies to yes, but still no luck. Any suggestions on getting static libraries referencing other static libraries to play nicely with each other?
The post was edited 3 times, last by Neurone ().