Of course there is a difference, __declspec (dllexport) is used to export the symbol, that is, the DLL that defines the function; __ declspec (dllimport) is used for import, that is, to use this function.
This header file must be included by the DLL defining the function and the program using the function. When the function is included, we want to use _ declspec (dllexport) to define the function, we want to use dllimport when included by the latter. So we use
# Ifdef _ exporting
# Define class_declspec _ declspec (dllexport)
# Else
# Define class_declspec _ declspec (dllimport)
# Endif
In the DLL defining the function, the compilation option defines _ exporting, but the program using the function is not defined.
Source: http://bbs.csdn.net/topics/330169671>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service