I have a file foo.h
that has various declarations for functions. All of these functions are implemented in a file foo.dll
. However, when I include the .h file and try to use any of the functions, I get the error:
bar.obj : error LNK2019: unresolved external symbol SomeFunction
so obviously the function implementations aren't being found.
What do I have to do to help the compiler find the definitions in the DLL and associate them with the .h file?
I've seen some stuff about __declspec(dllexport)
and __declspec(dllimport)
but I still can't figure out how to use them.