Tag Archives: visual studio

How to Solve Visual Studio C4996 Error

Follow the path VisualStudio\Common7\IDE\VC to find the folder VCProjectItems:

Right click to grant access permission -> Specific user

Click “share”

Enter the folder VCProjectsItems and open the file newc++file.cpp with Notepad. Paste the following into the file and save:

#define _CRT_SECURE_NO_WARNINGS 1

Right-click the folder VCProjectItems and click Properties -> Share -> Advanced sharing, click “share this folder” to uncheck it, and click “apply” and “OK”.

This will solve the problem. Create a new C/C + + file in vs. you can see the following code on the first line:

#define _CRT_SECURE_NO_WARNINGS 1

​​​​​​​

In this way, no error will be reported when using functions such as scanf(), printf().

PLSQL Startup Error: Initialization error [How to Solve]

preface

After the computer reinstalls vs2022, start PLSQL, and an error is reported, indicating that initialization failed

1. Solution

I installed client 12.2. I found that it requires Microsoft Visual Studio 2013 Redistributable on the official website. After vs2022 upgrade, this toolkit is lost.

Solution:
after downloading Microsoft Visual Studio 2013 redistributable, install it. (you need to uninstall the higher version first)
download address:
64 bit: vcredist_ X64
32-bit: vcredist_ x86

[Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…

cmake编译opencv开源项目报错问题

Recently, cmake encountered the following problems when compiling a C + + open source project configured with OpenCV environment:

CMake Warning at D:/opencv4/OpenCVConfig.cmake:176 (message):
  Found OpenCV Windows Pack but it has no binaries compatible with your
  configuration.

  You should manually point CMake variable OpenCV_DIR to your build of OpenCV
  library.
Call Stack (most recent call first):
  CMakeLists.txt:13 (find_package)


CMake Error at CMakeLists.txt:13 (find_package):
  Found package configuration file:

    D:/opencv4/OpenCVConfig.cmake

  but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
  NOT FOUND.

So I checked all the methods online, which are basically divided into two categories: one is to modify cmakeLis.txt document. The other is to change the OpenCV version or vs version. But They are not working for me. Finally, I accidentally found that x64 was not selected in configure, and x86 was selected by default. After x64 was selected, the compilation was successful.

https://blog.csdn.net/weixin_61023120/article/details/124738628

[Solved] error c101008d: Failed to write the updated manifest to the resource of file

System: win10
compiler: vs08

Error c101008d: error c101008d: Failed to write the updated manifest to the resource of file “XXX.exe”

Solution: Microsoft menu bar in the lower left corner – Settings – update and security – Windows Security Center – virus and threat protection – virus and threat protection settings – the following management settings – implement protection – off – recompile the project

[Solved] Error c2226: syntax error: unexpected ‘lpstr’ type

Question:

1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(6132): warning C4229: used mnemonic error: ignore modifier on data
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(6133): error C2226: syntax error : unexpected “LPSTR” type

Cause: Windows.h contains tchar.h and strsafe.h before Windows.h

Solution: Comment out the statement that contains tchar.h and strsafe.h before Windows.h.

[Solved] error: link.exe‘ failed with exit status 1158

Error Messages:

bug error: command ‘\XXX\VS2015\VC\BIN\x86_amd64\link.exe‘ failed with exit status 1158

 

Solution:

Because some of the previous system configurations are gone, reinstall things such as vs and buildtools, but there are many problems in the installation process, and there are always missing things. Record the contents that are difficult to find here
prompt error when the program is running: error: command ‘\XXX\VS2015\VC\BIN\x86_amd64\link.exe‘ failed with exit status 1158
background display
I read the online solution, that is, vs is missing two files rc.exe and rcdl.dll can’t run, but I can’t find these two files according to the online path
the path of others is:
C:\Program Files(×86)Windows Kits\8.1\bin\×86
I found it in this path
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64
or
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86
both can be used
in short, these two files are rc.exe andrcdl.dll must be in the path of C:\Program Files (x86)\Windows Kits, but the location of different system configurations may be different. This is probably related to some things you installed. Look carefully

then copy the two files to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64

Or C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
you can solve the problem by installing Microsoft Visual Studio 14.0

Cmake Compile opencv error: The system is: Windows – 10.0.19042 – AMD64 (Log File)

After clicking configure, an error will be reported by default. Check the log file:

The system is: Windows - 10.0.19042 - AMD64

Reason: the compiler is not selected correctly. You should select the one installed on your computer. For example, the 2019 version I installed is changed to 2019.

Solution: click file->delete cache to reselect the compiler.

Windows: How to Solve PCL C2065 Error

Solution of PCL running error under Windows

Configuration: vs2019 + pcl1 11.1+CMake3. twenty-two

The program has no problem, but there are a lot of error codes when running

Kdtree program

Solution:

Copy the program to a new txt file, save it, and then copy it to the vs2019 cpp document

Rerun results

reason

Maybe the program is downloaded from GitHub, and the coding method is wrong. It needs to be copied to TXT document for transcoding

[Solved] Compile Error: cannot open include file ‘afxres.h‘

Problem Description:

compilation error: cannot open include file ‘afxres h’


Cause analysis:

this is the header file of MFC class library</ font>


Solution 1:

If the MFC component is not installed, you can replace it with the next two lines

//#include "afxres.h"
#include <Windows.h>
#include <winres.h>
//Only one line winres.h is OK!

Solution 2:

Just install MFC components