Linker error, class library, windows SDK

Hello!

I'm trying to create a simple "OOP-wrapper" for Windows in unmanaged C++.
I've managed to create a set of classes that work. Now I'm trying to separate these classes into a separate library so that I can use them again later.

Anyway, when I try to compile the class library, I get the following errors:
Several LNK2028 & LNK2019 errors, all saying "Unresolved external symbol" and then a windows function for example: "ShowWindow".

I assume I've forgotten to reference the correct libraries somewhere but I don't understand where. Again, this did work when it was just a win32 app.

Thanks in advance!

EDIT: forgot to mention that I use MS Visual Studio 2008 Professional Edition and the latest version of the windows sdk.
Last edited on
1. You forgot using the extern "C" to include all dllexport functions?

2. Does your code refer to other .lib file?
#pragma comment(lib,"YourLib.lib")
Last edited on
I found the problem. It was really stupid of me. I had accidentally created the DLL as a "Class Library"-project in VS2008 which is managed C++. I recreated it as a win32 application and selected DLL in the wizard and it worked.

Now I have another question. Is it it possible to change some setting to make VS2008 automatically look for header-files in all project-folders of the current solution?
Is there a "Additional Directory" in your setting?
I'm not familiar with VS 2008.
Well, yes. I can easily add the directory to any project through the priject settings. I just wondered if you could set some general setting to always include all projects filders of the current solution.
Topic archived. No new replies allowed.