Tag Archives: vs

error C4996: ‘pcl::SAC_SAMPLE_SIZE‘ [How to Solve]

Error: pcl-1.8\pcl\sample_consensus\model_types.h(99): error C4996: ‘pcl::SAC_SAMPLE_SIZE’: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class

Solution:
Open the project property page > C/C++ > General > SDL Check (set to No).

#During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory

During OpenGL development, fatal error C1083: can’t open include file: “GL/glut. H”: no such file or directory

I use vs2012 to write a simple OpenGL program, which always prompts when running:

Fatal error C1083: unable to open include file: “GL/glut. H”: no such file or directory;

Or fatal error C1083: cannot open include file: “GL/glaux. H”: no such file or directory;

At this time, the corresponding operations are as follows:

1. Download glut Toolkit: glut_ 37beta. Rar
2. Untie the downloaded compressed package and you will get five files, including glu32. Lib; glut32.dll,glut32.lib; Glut.dll, glut. H, glut. Lib
3. Put the extracted glut. H and glux. H in the folder C: program files (x86) and windows kits (8.0) and include (UM)( Note: the directory where each person installs vs is different, and the operation is based on the actual situation)
4. Put the extracted glut.lib, glut32.lib and glaux.lib in the static function library, which is located in the folder C: program files (x86) – Windows kits (8.0) – lib (win8) – um (x86)
5. If it still can’t work, put glut32.dll back to C: Windows/syswow64
6. Compile again. If there is still an error, change the original name of the header file # include & lt; GL/glut.h> Include & lt; glut.h>。
///

Download address of glut in Windows Environment: (about 150k in size)

http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip

This is the first article I saw when I configured the environment. Later, I made a mistake and used the method of this article to solve the problem https://www.pianshen.com/article/78231370291/

Vs compilation error msb6006:“ cmd.exe ” exited with code 1.

Please note: http://blog.csdn.net/hust_ sheng/article/details/78827167

When this error occurs, the program will not crash, but the error window will display the above information~

There are a lot of blogs on the Internet to solve this kind of problem, but we can see that the reasons are different (incomplete files, insufficient administrator permissions, path containing Chinese, path containing spaces…) Because such problems are often not caused by one or even several certain reasons. Of course, we can’t rule out the consistent reasons for the compilation process of some fixed software, such as this blog

So in most cases, how can we determine the cause of the error in our own project?

look at the log information of the compilation process and the error prompt! I found that the reason for this error is that I didn’t install python

Error: unable to open include file: ‘GL / glut. H’

Today, someone else’s source program appeared such a problem, the first thought is the lack of files, really after viewing the lack of some toolkits, in this solution is offered, for your reference:
1. Download the GLUT Toolkit. https://download.csdn.net/download/xianhua7877/10473663
2, will download the package, Will get five documents, including GlU32. Lib glut32. DLL glut32. Lib glut. DLL glut. H glut. Lib
3, let the glut of decompression. H into the C:/Program Files/Microsoft Visual Studio 9.0/VC/include the folder.
4. Put the Glut. lib and Glut32.lib Files in the C:/Program Files/Microsoft Visual Studio 9.0/VC/lib folder where the static function libraries are located.
5. Put the extracted Glut. DLL and Glut32.dll in the system32 folder under the operating system directory.
6. This step is very important, this step is very important, this step is very important, run again, if the error is still, then change the header file’s original name #include <; GL/glut.h> For the # include & lt; glut.h> .

In vs programming, the code of Ctrl + F5 is flashback

When VS compiles and runs the code, if there is no delay or some kind of response, the window will close immediately after running
Solution a:
in the main function and getchar ()

; add system(” pause “) to the main function
Solution 3:
right-click on the project, select properties, choose the linker, selection system, in the subsystem, the console this

the above methods are debug mode, the way of carrying the shortcut Ctrl + F5
in debug mode, just set a breakpoint in the main function, then one by one to debug

Problems encountered in running OpenGL

Problems running OpenGL with VS
Problem 1. Linker tool error The link2026XXX module is not secure for the SAFESEH image
Solution:

1. Open the Property Pages dialog box for the project.
2. Click the Linker folder.
3. Click the Command Line property page.
4. Type /SAFESEH:NO into the Additional Options box and click Apply.

Reference: http://www.cnblogs.com/hanxi/archive/2012/06/10/2544230.html

Problem 2. The computer is missing GLUT32.DLL
Solution:
1. Check to see if it is in the Windows/System32 folder
2. If it is a 64-bit system, check to see if it is in the Windows/SYSWOW64 folder

Make DOS window wait and not flash back in VS

Four ways:

Method 1: When running a program, instead of executing it with the F5 key, use Ctrl+F5 to execute it, which means “Start Execution (Not Debugging)”, so it won’t flash by.

Method 2: Add this console.readline () at the end of your code; That is, “wait for user input,” so the DOS window won’t close until you hit enter

Method 3: Add console.readKey () at the end of the program; The DOS window will not exit until it receives a character.

Method 4: Run the program under CMD.

[vs console program flashback]


Today, when I was writing a program, I encountered a problem with VS console program flashing back. So I Googled it and found the following solutions:
Before the return, add system(” PAUSE “); PAUSE is case-insensitive; Add getchar() before return; Project – & gt; Property – & gt; Configure properties ->; The linker – & gt; System – & gt; Subsystem – & gt; SUBSYSTEM adds the “/SUBSYSTEM:CONSOLE” link option and just configure it
Three methods have been tried, can use ~

Vs debug window flashback

There are three ways:
1. Start debugging Don’t use this button: directly Ctrl+F5 start. The effect is as follows:


2. Add the system (” pause “);
#include< stdio.h>

the main () {
printf (” Hello, World! \n”);
system (” pause “);
}
The effect is as follows:


3. Add _getch ();
#include< stdio.h>
#include < conio.h>

the main () {
printf (” Hello, World! \n”);
_getch ();
}
The effect is as follows: