I'm trying to use static library that include other static libraries.
There are two projects: Engine, MyGame
'Engine' is going to produce Engine.lib
'MyGame' is going to use Engine.lib when it is linking.
Following is the build message that I'm getting from visual studio 2012:
1>------ Rebuild All started: Project: Engine, Configuration: Debug Win32 ------
2>------ Rebuild All started: Project: MyGame, Configuration: Debug Win32 ------
1> Precompiled.cpp
2> Main.cpp
2>LINK : fatal error LNK1104: cannot open file 'D:\klee\Engine\Debug\Engine.lib'
1> RenderGame.cpp
1> RenderDebug.cpp
1> MsgHandler.cpp
1> Main.cpp
1> Log.cpp
1> Input.cpp
1> Interface.cpp
1> Helper.cpp
1> GameObject.cpp
1> Framework.cpp
1> Engine.cpp
1> Config.cpp
1> Component.cpp
1> Generating Code...
1> Guicon.cpp
1>glu32.lib(GLU32.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in glew32.lib(glew32.dll); second definition ignored
1>glu32.lib(GLU32.dll) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>opengl32.lib(OPENGL32.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in glew32.lib(glew32.dll); second definition ignored
1>opengl32.lib(OPENGL32.dll) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>SDL2.lib(SDL2.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in glew32.lib(glew32.dll); second definition ignored
1>SDL2.lib(SDL2.dll) : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1> Engine.vcxproj -> D:\klee\Engine\Debug\Engine.lib
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
At first, it seems like 'MyGame' fails to find Engine.lib, but the project does produce executable that runs fine.
Second, 'Engine' includes other libraries(SDL2, OpenGL, GLEW) to produce its new library, but it says symbols are duplicated.
What does 'symbol' exactly mean?
What does it mean symbol being 'public' when linking?
If these warnings are critical, why is it and how do I fix it?
How do I configure build sequence between projects?
Any best practices using external libraries in my project?
Two projects shares some dll(SDL2.dll, glew.dll). If other users are going to use this Engine.lib, how do I provide these dlls?
Thank you.