Tag Archives: visual studio

Configuration problem of pcl1.9.1 under Windows 10 vs2017 (solved)

Windows 10 VS2017 PCL1.9.1 configuration issue resolved
The first time to use the PCL library, encountered many problems. Write down some problems here so that other friends who have the same problem can solve them.
configuration
I won’t talk about the basic configuration, you can refer to this blog. I think that’s pretty detailed.
especially recommend a property sheet, then I don’t need in the configuration.
The problem
I ran into several problems after following this blog configuration.
The parameters of the E2512 functional test macro must be simple descriptors
VS2017 at compile time errors E2512 functional test macro parameter must be a simple identifier

this error can be ignored, actually does not affect your code generation, just IntelliSense errors.

Problem with pop_t not finding identifier
I searched this issue for a long time and finally found a solution on GitHub’s Issue.

oblem in PCL third party library Flann kind, dish.h file. #ifpop_t is used in #elsebut is not specified, so we add this sentence (which was originally defined in #if).

Vs under the execution of OpenGL program can run successfully, but do not show things

There are possible reasons

1, the graphics card does not support the current version of OpenGL, download Everest Ultimate Edition, then click the display device> after installing and running. OpenGL, to see whether support and other relevant information, if not can only replace the graphics card or to support the OpenGL version of the solution

2, The video driver is not supported, update the video driver

Vs2017 FAQs

1. VS2017 could not open included file: “corecrt.h” : No such file or directory/ VS2017 could not open included file: “errno.h” : No such file or directory
Solution: Everything searches for the corresponding “corecrt.h”/” errno.h “header file

Find the corresponding path, and then in VS2017

 
2. ERROR LNK2038: Mismatch of ‘_MSC_VER’ detected: value ‘1600’ Mismatch value ‘1800
 
I encountered this problem because of the conflict of Qt versions, the problem left over from previous installation, the problem of 32-bit Qt and 64-bit Qt, and the installation path of Qt. Before, one was installed on both C and D disks.

 
Delete the other one and leave the same Qt as your computer version.
3. Unable to find entry program anchor point, cannot link dynamic library. The module computer type “X64” conflicts with the target computer type “X86”.
First modification:


At the entry point
Set the entry point to the console, and the console will appear after running. It makes me feel bad.
Second modification:

 

Later, I found that the library call path under UCRT, Tool was set incorrectly. I set it to X64, but I can change it to X86 folder.
 

Using GitHub in vs2017

These days, I have encountered some problems in the process of learning related knowledge of GitHub, especially the use of built-in GitHub in VS2017. It would be helpful to record them.
One, making the Extension for Visual Studio
on many CSDN tutorial is directly speak in the heart of the VS2017 project manager, added to the code synchronization, push. You may think that Extension is unnecessary, so you should know it by default. In fact, to use GitHub in VS2017, you must start with the GitHub Extensionan installation. Open the Tools – & gt;

then search and install GitHub Extension for Visual Studio. The image below shows that I have already installed it. I actually need to select and install it from the Online option on the left. After downloading and installing, VS will prompt you to close all VS Windows and restart. After restarting, you can use it without accident.

Of VS2017, making use of the
if you are starting from scratch, in fact, there are a lot of information on the CSDN is can refer to, but I had used a fancy Git Bash, and making the Desktop, and established the multiple libraries in making account (Repository), want to in the existing library to complete the remote Repository (remote: origin) and the link between the local library.
1. First open the Team Explorer -> Manage Connections-> Connect to making

will pop up a interface requirements input lot account password, this is your own. When you successfully log in, your account will receive an email telling you that the third-party plugin is logged into GitHub. Just ignore it.


2>fter login, fill in your User Name, Email, and local library path in Global Settings, then you can go to Connection interface to continue using. Connection Local Git Repository (‘ New ‘, ‘Add’, ‘Clone’); Connection Local Git Repository (‘ Add ‘);


3>nce you have connected the local and remote libraries, you are ready to make changes. This is the same as with Git, except that the UI is integrated into VS. Doublicking on the local library that has changed, such as AlexchongMicrosoft here, will bring you to a more detailed action menu, which those of you who have used GitHub should have a rough idea of what it means.

. This command doesn’t seem to exist in Git. Personally, it means VS and GitHub sync. In practice, it feels like Commit and Push. In addition to ontology synchronization to the remote end, I wonder if there are other commands like pull synchronization from the remote end to the local end. I can try it if I have a chance in the future.

Visual studio 2017 experience

On March 7, 2017, Microsoft released the 20th official version of Visual Studio — VS2017. I also can’t wait, the first time to download and install the community version, after all, this is the first IDE in the universe ah, on the VS2017 relative to the VS2015 improvement overview, please move to open source China, here to say that I as C++ installation and use experience.
Install the feeling
Installation interface for personal depth customization
About the installer
VS2017 has a new installation logic and steps, I use the way of network installation. VS2017 uses a separate installer to download and install VS components. The first installer downloaded from the official website is very small, with a space footprint of only 0.99M. (This is a real thing, the MS VS team must know that I have poor C disk space!) .

but this is not the real installer, real installer is needed by this small program to download and install, and then you can use. Installer volume……

wnload quickly, after the completion of the installation will automatically install the system under the C disk, and open the VS2017 installation version selection interface, I installed the VS2017 community version, enough to use, the focus is personal use does not spend money on the legal version.

Modular customization
Choose a good version, load for a while will enter the VS2017 module selection interface, the overall feeling is very refreshing, customization is very simple, you can choose a large module, such as.NET desktop development, or C++ development, or Windows development and so on, see the picture by yourself… . (I haven’t chosen any here, only the core editor, which takes up only 764MB of space! Heaven and earth conscience! ╮ (╯ del ╰) ╭)

in choosing a good big modules, also can undertake the choice of a single component, it is important to note that between components are interdependent, and some of the dependence between components is mandatory, some of it is not mandatory, for C disk will be lost comrades, Suggestions can seriously customization, unnecessary, or can be configured after installation, don’t need to use the installer installed, like a Win10 SDK is likely to be the hard disk C; For cross-platform development using VS, such as Android development, develop the required suite (JDK, NDK, SDK, Ant…) Basic can be installed after VS to configure, after all, it takes time to download, and the general VS installation path will be placed in the default C disk, so the VS components you choose will be installed C disk by default!


the installer can be directly the optional language pack, it’s a fine details of the changes, I personally before I hope I can a installation on English language and Chinese language pack, every time is to the other from the website to download the language pack, feel quite troublesome.

ah

Detailed steps for installing Visual Studio 2010 + Intel parallel studio Xe 2013 and configuring mpich2

Pre-installation Instructions
Before installation, it is necessary to determine whether your VS and IVF version matches, as shown in the figure below. Also, the MPICH version is very important, this article USES the 32-bit, if the installation of 64-bit cannot be configured, it will be mentioned later.

Install Visual Studio 2010

    download Visual studio 2010 unzip and double-click setup.exe “Next” until finished, select exit;

Install Intel Parallel Studio XE 2013

    close VS(otherwise cannot load ivf template) unzip w_fcompxe_novsshell_2013.2.149.zip double-click the installation file, open it, select license configuration, and select lic under the installation file; When it comes to Options, look at the Installation Summary list for instructions added to VS, which is the part with the red coil. If so, it means that after IVF you will be able to use Fortran in VS.
    starts the installation to check whether the FORTRAN module has been successfully added, as shown in the figure below

Install and configure MPICH2

    double-click and install mpich2-1.4.1p1-win-ia32.msi(the installation file provided in the network disk linked in this paper requires mpich of version 32, and the hosts of “Get setting” of the 64-bit version cannot be changed to green when wmpiconfig. Exe is used); After installation, strictly follow the configuration file (win7_vS2010_mpich2.pdf) given;

It will appear as soon as it is turned on BTServer.exe -Application error (0xc0150002)

I have nothing to uninstall VS2015, looking at the C disk space is only a little, began to look for a large software uninstall, did not expect to uninstall some runtime library,
The result is a “Btserver.exe – application error” at 0xc0150002.
I continued to search for solutions, reinstalled the runtime, patched Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) and Microsoft Visual C++ 2008, and
still didn’t work.
Later I saw Baidu know there is a method, uninstall the Bluetooth Driver that program, restart, it is good, then reinstall the Bluetooth Driver, then boot did not appear.

Attach the original author advice website: https://zhidao.baidu.com/question/1691955593795084148.html

Visual Studio Tips: error LNK2005: … already defined in LIBCMTD.lib(new.obj)

Problems encountered

A very old C++ project, before the compilation was all right, just after I introduced a few new.h and.cpp files, the compilation failed to pass, reported the following error:
(On the premise, of course, that there is no problem with the new files I introduced being double-checked, otherwise I would have started with those files and there would have been no article.)

Error	2	error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)	
C:\Work\Demo\DemoApplication\nafxcwd.lib(afxmem.obj)	Sentinel-XP



1>------ Build started: Project: DemoApplication, Configuration: Debug Win32 ------
1>  text.cpp
1>gbk.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj)
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)
1>nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj)
1>Debug\DemoApplication.exe : fatal error LNK1169: one or more multiply defined symbols found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Problem analysis

There is no such thing as a gratuitous compilation error. After an extensive search, there is an explanation on MSDN that I think is very good. Here is an excerpt:

The CRT libraries use weak external linkage for the new, delete, and DllMain functions. The MFC libraries also contain new, delete, and DllMain functions. These functions require the MFC libraries to be linked before the CRT library is linked. 

I will not translate it into Chinese, I am lazy, and I believe everyone can understand this sentence.

This way, we give the MSDN link: https://support.microsoft.com/en-us/kb/148652

To solve the problem
In this article on the MSDN: https://msdn.microsoft.com/en-us/library/72zdcz6f.aspx
The following sentence was given:

To fix, add /FORCE:MULTIPLE to the linker command line options, and make sure that ... is the first library referenced.

is just like this:

Then it was compiled. Although there were some warnings, the compilation passed:

1>------ Build started: Project: DemoApplication, Configuration: Debug Win32 ------
1>  ...
1>  ...
1>  Compiling...
1>  ...
1>  Generating Code...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>gbk.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj); second definition ignored
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj); second definition ignored
1>nafxcwd.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMTD.lib(delete2.obj); second definition ignored
1>Debug\DemoApplication.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
1>  DemoApplication.vcxproj -> C:\Work\Demo\DemoApplication\Debug\DemoApplication.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

works fine.

Of course, this is not the root of the problem, but given the old project document, I can’t easily change it too much, so let’s leave it as an imperfect solution.

reference

A LNK2005 error occurs when the CRT library and the MFC libraries are linked in the wrong order in Visual c + + https://support.microsoft.com/en-us/kb/148652
would Tools error LNK2005 https://msdn.microsoft.com/en-us/library/72zdcz6f.aspx
selectany https://msdn.microsoft.com/en-us/library/5tkz6s71 (v = versus 80). Aspx
LNK2005, “Already defined error” would error in MSVC2010 http://stackoverflow.com/questions/8343303/lnk2005-already-defined-error-linker-error-in-msvc2010

If you want to open more than one program “pdc140.xxx”, the CL.EXE To write to the same. Pdb file, please use

Solution: Modify the project properties by right-clicking on the project –& GT; “Properties”
1. “C/C + +” — — & gt; “Routine” –& GT;” Debug information format set to C7 Compatible (/Z7)
2. “C/C + +” — — & gt; “Code Generation” –& GT; Enable String Pool “set to” Is (/GF)”
3. “Linker” –& GT; “Commissioning” –& GT; Set “yes (/DEBUG)”
to generate DEBUG information
And then you’re ready to compile.