I have a question, and I have tried searching for the answer but none of it makes sense and most of it is outdated.
Anyway, can someone explain how to link a static library / dll file to my main application?
Go to your project properties -> Linker -> Input and list the names of the libraries you want to link to. You may also need to tell it where to find said libraries.
The thing is, which is my problem, is that I build the "Static Library" but it gives me a .dll file, but when I create a .dll file, the structure is totally different. I'm semi-new to c++ so it's kind of confusing.
//Edit:
I edited something in my project properties and it is now set to output a .lib. But now, my program says something about a precompiled header when I try to build
//Double Edit:
I remade a Win32 Project and set it to static library and uncheck precompiled header. I created the files necessary and copied all my code in. It builds fine, and I did that linker thing, but I can't use "using namespace" for the library's namespace. Ill probably figure it out though.
Err, I don't know... All I want is an application with one source file (with the exception of stdafx.cpp) and all my classes that define my functions in one library that is linked to my application so that I can use them in my code.
A library just provides definitions, it doesn't provide declarations. Without declarations, the compiler doesn't even know the definitions exist. You need to include your library's header file.