Warning c4273: inconsistent DLL links

Source: Internet
Author: User

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.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.