Tag Archives: vs2012

Visual studio 2012, a complete collection of solutions to flash back windows after running

Visual Studio 2012, flash back window after the solution of operation

I believe you all have a kind of want to beat the rhythm of the person, every time to write the code, after the code is written, run the compiled code but the result of window flashback, below, I will introduce several solutions to Visual Studio 2012 run window flashback method. I hope I can help you solve this problem.
Method 1: Press Ctrl +F5 to run the program, and then run the program.
This method is only to solve the general flash back, rookie level novice if there is a flash back, might as well try this method, Xiaobian when just contact VS, is to use this method to solve.
//add system(“pause”) before Main’s returrn = 0;
This method can solve most of the flashback problem, of course, some more advanced, Xiaobian temporarily do not know whether this method has any effect, and so on later contact will be constantly updated.
Method 3: Use getchar() before return. This method can also solve the flashback problem, but you have to try it out slowly.
Method 4: Flashback will occur when an exception is encountered. To solve this problem, it is generally necessary to check the various plug-ins of VS itself, which may be caused by the expiration of plug-ins.
Method 5: you can try to set the debugging type to native or mixed only, this method is not always effective, the specific effective Xiaobian has not found the result, know the dear friends can also reply.
Inline void keep_window_open(char ch; cin> > ch;) , then add keep_Window_open() to the end of the mian function; This method is the most effective and the most commonly used, and the most effective method. (Recommended)
Method 7: Set breakpoint debugging method, press F9 to set breakpoint, press F10 to step debugging. This method is also very effective in finding errors.

The above is a summary of the solution to VS2012 flashback method, there are mistakes please point out, Xiaobian in this thank you. Of course, if there are other ways to reply, so that more latecomers can see, no longer bothered by the problem. Thanks for the flowers

The solution to the error of “no override found for * *” in the use of VTK

This error is caused by not compiling with CMAKE, so some macro definitions and configurations are not initialized, resulting in the factory function of the class being used being unusable. So based on my experience in these days:

    first of all, the example programs such as cone, attribute macro definition in c + + preprocessor “copy” to their own projects; If this error occurs again, use such as VTK_MODULE_INIT(vtkrenderingVolumeOpenGL); Initialize the required modules.

More are still being explored…

Vs2012 compiling PCL dependency library vtk7.0

Software preparation:
1. Download the source code compression package VTK-7.0.0.zip from the VTK official website and extract it.
2. Download the installation package QT-Opensource-Windows-x86-MSVC2012_OpenGL-5.3.2. exe from the Qt official website, and install it by default.
3. Download the installation package cmake-3.0.2-win32-x86.exe from the official website of CMake, and install it by default.
Cmake set
1. Check Groupd and Advanced, and set the source code directory and build directory.
2. Press the Configure button, select VisualStudio 11 2012, click OK, and wait for the configuration to complete.
3. At the VTK node, locate and check VTK_GROUP_QT. Press the Configure button and wait for the configuration to complete. When done, CMake will report an error and click OK.
4. In the UngroundedEntries node with a red background, locate and change the value of VTK_QT_VERSION to 5. Set the value of QT_QMAKE_EXECUTABLE to C:/Qt/Qt5.3.2/5.3/msvc2012_opengl/bin/qmake. Exe. Press the Configure button and wait for the configuration to complete. When done, CMake will report an error and click OK.
5. In the UngroundedEntries node with red background, set the value of Qt5_DIR to C:/Qt/ qt5.3.2/5.3/msvc2012_opengl/lib/cmake/Qt5. Press the Configure button and wait for the configuration to complete. When done, CMake will no longer report errors.
6. On the CMAKE node, locate the CMAKE_INSTALL_PREFIX node and use the default Settings. This value is the installation directory of the VTK after compilation.
7. Click Add Entry button, set Name to CMAKE_DEBUG_POSTFIX, Type to STRING, Value to -GD, and click OK after setting. Press the Configure button and wait for the configuration to complete. Set this to ensure that the debug version of lib, DLL and release version of lib, the DLL name is different, to prevent later installation, both overwrite.
8. Click the Generate button and wait for the project VS file to be generated.
9. Locate the plugininstall. cmake file in the GUISupport\Qt folder of the build directory. Open it with Notepad and take line 5
SET (VTK_INSTALL_QT_PLUGIN_FILE QVTKWidgetPlugin. DLL)
Replace with
IF(BUILD_TYPE MATCHES Debug)
SET (VTK_INSTALL_QT_PLUGIN_FILE “QVTKWidgetPlugin – gd. DLL)”
ELSE()
SET (VTK_INSTALL_QT_PLUGIN_FILE QVTKWidgetPlugin. DLL)
ENDIF()
Note: Make sure that qvtkwidgetPlugin-gd.dll and qvtkwidgetPlugin.dll are surrounded by double quotation marks after substitution. Otherwise, subsequent compilation will return an error.
Save. This modification can prevent the QVTKWidgetPlugin file from being found when installing Qt plugin during debugging.

VS2012 compilation

1. Run VS as an administrator, click File, Open, and the dialog box pops up. Find the vtk.sln file in the path and open it.
2. In Solution Manager, go to ALL_BUILD, right-click, and click Build. Wait for VS to compile. When finished, find Install, click the right mouse button, and click Create.
3. Change the solution configuration to Release. In Solution Manager, go to ALL_BUILD, right-click, and click Build. Wait for VS to compile. When finished, find Install, click the right mouse button, and click Create.
4. After the above steps are completed, the compiled file will be in the path set by CMAKE_INSTALL_PREFIX.