How to import a symbol from a DLL
I've got two projects in a VS2019 solution. One is a DLL and one an console EXE which should import symbols from the DLL. I want to do that wighout __declspec(dllexport) / __declspec(dllimport). With the DLL I have a .DEF-file which says which symboles are to be EXPORTed. When I look at the .lib- or the DLL-file with DUMPBIN /exports I get shown the correct exports. AFAIK I only need to declare the external functions in the EXE and have the .lib-file in my EXE-project linker-settings. But that doesn't work - my linker says that there's a missing external symbol in the .OBJ- as well as the .EXE-file. How do I prepare the EXE-project correctly ?
There were times before __declspec(dllexport) / __declspec(dllexport) and in this ages I only used .DEF-files and imported the symbols via a .lib as I described above. But that was about when I used NT 3.1 in the first half of the 90s. So I'm pretty sure this should work like I had it before today also.