Static Library C++ Unresolved External Symbol
Hello Folks:
Developing on Win 10 Pro, VS Community 2022 updated today, all C++.
This feels like I must be doing something stupid. Perhaps I forgot to do something.
I like to use static libraries.
I created a new library called common_diagnostic to give all of my diagnostic output a common look and feel.
I've started with the library having two files, header and source, that should define a const char * for use by other modules.
These files are just minimal to get a build to work:
#pragma once
#include "pch.h"
Building Application
I altered common_diagnostic.cpp to force it to be compiled with Build > Build Solution. It seems to compile without error. DEFAULT_DIAGNOSTIC_INDENT is defined in that file as a global variable.
Commctrl_diagnostics is a different static library, currently the only module that makes an external referenc to DEFAULT_DIAGNOSTIC_INDENT.
Here is the build report:
1>------ Build started: Project: common_diagnostic, Configuration: Debug Win32 ------
I think I've done what's needed for dependencies:
I've noticed the .cpp files in all of the other libraries I've built and used have #include "StdAfx.h". This library uses #include "pch.h".
I have no idea if that bit if information helps.
What did I forget?
Thanks
Larry