Why do I get “unresolved external symbol” errors when using templates? [duplicate]

Templated classes and functions are not instantiated until they are used, typically in a separate .cpp file (e.g. the program source). When the template is used, the compiler needs the full code for that function to be able to build the correct function with the appropriate type. However, in this case the code for that … Read more

Embedding DLLs in a compiled executable

I highly recommend to use Costura.Fody – by far the best and easiest way to embed resources in your assembly. It’s available as NuGet package. Install-Package Costura.Fody After adding it to the project, it will automatically embed all references that are copied to the output directory into your main assembly. You might want to clean … Read more

How does the compilation/linking process work?

The compilation of a C++ program involves three steps: Preprocessing: the preprocessor takes a C++ source code file and deals with the #includes, #defines and other preprocessor directives. The output of this step is a “pure” C++ file without pre-processor directives. Compilation: the compiler takes the pre-processor’s output and produces an object file from it. … Read more