Method 1: select project> Properties> pre-processor> pre-define and add hycommonwinapi_exports.
Method 2:
In
# Ifdef hycommonwinapi_exports
# Define hycommonwinapi_api _ declspec (dllexport)
# Else
# Define hycommonwinapi_api _ declspec (dllimport)
# Endif
Added # define hycommonwinapi_exports
In fact, both methods add definitions.
Method 3: In your dll cpp file
# Define hycommonwinapi_exports
Add to # include <interface file. h>
Before
Method 4: Right-click the DLL project -- properties, open the properties page, expand: Configure properties -- C ++ -- Preprocessor, and enter _ afxext at the end of the pre-processor definition, compile again.
Try the above methods one by one. I don't know if I can help you. In addition, it is better to go to The csdn community to ask this kind of question. I often go to csdn if there are fewer users on Baidu.
It is very depressing that this problem will occur again in relaese DLL, and the above 4th solutions do not work. Other methods do not know how to operate at the moment, because there are 3rd ways to follow it, an error occurs.