Tag Archives: Vc

How to Solve Microsoft.CppCommon.targets(279,5): error MSB3073

1>*** PARSE FAILURE ***
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(279,5): error MSB3073: The command "@echo off
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(279,5): error MSB3073: setlocal...

There is no problem with local compilation, and the compilation server reports an error.

The reason is the problem of GIT line feed in Windows system. The carriage return line feed in the project is modified in the vcxproj obtained by git, resulting in the script error in vcxproj.

Modify the GIT line feed setting of windows system, and the problem disappears.

[Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory

The stdint.h file is a standard header file for C99, which is not supported by vs2008 by default, so you will definitely encounter the problem of “No such file or directory” in the process of using it.

Solution: Download stdint.h or make a copy from vs2010 and put it under Program Files (x86)\Microsoft Visual Studio 9.0\VC\include path

Solve the problem of VC6.0 open crash and OpenGL glut32.lib library

VC6.0 Open crashes
Recently, I learned OpenGL and tried to debug with VC6, but found that after installing VC6, ADD and OPEN projects could not be used, so I summarized the simplest solution. This method is very common, just for the sake of going directly to my blog to find it after I encountered it again. (1) First copy the FileTool. DLL file to the folder “VC6 installation path “\Common\MSDev98\AddIns

FileTool. DLL available download address: http://download.csdn.net/detail/yangxkl/4061390
(2) manually register the DLL regsvr32 “VC6 installation path \Common\MSDev98\AddIns\FileTool. DLL “in CMD

(3) Right click on the toolbar, Customise… -> Add-ins and Macro Files

Select the Filetool Developer Studio Add-In add-on,
Then click Close

add after the success, the VC on the interface of two more green menu button, an A, one is O, implements the increase and the two button to open the file.

(4) If the module “xxx. DLL “is loaded, but the call to DllRegisterServer fails, it is a problem to add the DLL by hand.

:

program – attachments – command prompt, click the right mouse button on the “command prompt”, select “run as an administrator” command, this time will open the DOS command window, now as normal type Regsvr32 xxx. DLL, can be registered successfully.

This will successfully increase the DLL file. To this VC6.0 open crash problem is solved.

Fatal error LNK1104: cannot open file “glut32.lib” : fatal error LNK1104: cannot open file “glut32.lib” : fatal error LNK1104: cannot open file “glut32.lib”

Glut. lib is a standalone library that does not come with standard OpenGL, and can be downloaded online
Download Glut-3.7.6-bin.zip (Glut32.lib Glut32.dll Glut.def Glut.h)
Available glut – 3.7.6 – bin. Zip download address: http://download.csdn.net/download/dragoo1/1148263
Put the glut32.lib file in the VC6 interface and go to the library files path of tools-options-dictinaries… In the vc98/lib directory, place glut32.dll in C :/ Windows /system32.
All OK.
The.h,.dll, and.lib files in “Glut-3.7.6-bin” are copied to the root directory of the project folder and are included in the “#include” Glut.h “method.
Everything is OK!

Three, attached VS2008 to add header directory and Lib directory method
H file directory:
in turn, click on the “Project – configuration properties – C/C + + – regular”,
Project – & gt; Property-> C/C++-> General-> Additional Include Directories

b :
G> “Project — Configuration Properties — Linker — General” and put the Directories
project> in the Additional Include Directory. ProPerty-> Link-> General-> Additional Include Directories
>, go to “Linker Directories” and add lua51.lib
put ->; Additional Dependencies
or
# pragma comment (lib, “lua51. Lib”)

[181124] VC + + use OpenGL to draw 3D graphics example source code

Download the source code
In VC++6.0 using OpenGL drawing 3D graphics example source code, source code is more complex, it can draw 3D three-dimensional renderings, cuboids, cubes, etc., its function is similar to a simple 3D drawing tools, there are other functions, you can download a compilation to explore what it is!
Source download address: click to download
Alternate download address: click download

fatal error LNK1120: 1 unresolved externals

Experiment error note.

OpenGL.obj : error LNK2001: unresolved external symbol “public: __thiscall CGLFont::CGLFont(void)” (??0CGLFont@@QAE@XZ)
Exe: Fatal Error lnK1120:1 Unresolved Externals

Error message: Unresolvable external symbol “public: Thiscall CGLFont::CGLFont(void)” code refers to content (such as functions, variables, or labels) that the linker cannot find in the library and object files.
some people on the Internet say there are two possible reasons: “1. The program lacks lib files in project -> 2. Add the required lib file to the link in setting.”

“2. In a program, functions are only declared undefined, and this problem is most likely caused by misspelling the name of the function when defining the function.”
http://wenda.tianya.cn/question/3e750b81a3b043cf

Link: fatal error LNK1104: cannot open file “debug”/ xx.exe The question of

Question:
running VC always occurs when
Linking…
LINK: fatal error LNK1104: cannot open file “Debug/xx. Exe”
error link-exe.
xx.exe – 1 error(s), 0 warning(s)
I was
the Windows 7 system in C:/Program Files/under the Microsoft Visual Studio/myprojiects is can’t find project file you wrote, because in this directory is writing something need administrator privileges, the system will only be reported to the “always open a file” error, the solution is to close the software, and then to administrator privileges to run the software, so that you can perfect debugging Program.

error C2137: empty character constant

Number: C2137
Null character definition.
Error analysis:
The reason is that two single quotes are used together without any characters in between. In general, single quotes represent character constants. Single quotes must have, and can only have, one character (when an escape character is used, the character represented by the escape character is treated as a character). Nothing between two single quotes is not allowed.
Case study:

#include<stdio.h>
int main()
{
    const char a='';
	printf("%c",a);
	return 0;
}