Recently, I used the Boost library for multi-thread development. It is visible that the compilation engineers in vs always encounter Macro redefinition errors, similar to the following error description.
1>c:\program files (x86)\microsoft visual
Windows. H and winsock2.h contain sequence. Generally, when using C ++ for network development on the Windows platform, these two header files are included at the same time. If the sequence is improper (windows. h prior to winsock2.h. For
The VC project must be consistent with the linked static library (*. Lib) file:For example:
Does the Shared Mode use mfc dll or the static mode use mfc dll?Is it multithreading or a single thread? Is debug mode or release mode? Project property
# Pragma is the most complex preprocessing command in C ++. The following are the most common commands # pragma commands:
# Pragma comment (Lib, "XXX. lib ")
Link to the library XXX. Lib, which is the same effect as writing XXX. Lib in the Project
Today, we changed the original project from MFC to a non-MFC project, and many errors have occurred. Now we have recorded them as backups.
Summary:
> C: \ Program Files \ microsoft sdks \ windows \ v6.0a \ include \ ws2def. H (91): Warning c4005:
#pragma预处理命令The most complex preprocessing directives #pragma可以说是C + +, the following are the most commonly used #pragma directives:#pragma comment (lib, "XXX.lib")Indicates that the link XXX.lib this library, and is written in the project settings
It was probably too smooth to install and use QT before, so I started to use it without paying attention to anything. After using vs2012 to develop a program named qt5.31 for a period of time, although it is easy to use, but it is found that the
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.