当前位置:网站首页>Common operations in Visual Studio development

Common operations in Visual Studio development

2022-06-22 15:15:00 Ton ton does not fight wild

The following are based on visual studio2017 Conduct

1. Interface settings

1.1 Font size

Tools -> Options

 Insert picture description here
And then in Environmental Science -> Font and color ,

  • The default font is Chinese XXX, I'm usually used to it consolas,
  • there Consolas Represents an equal width font , It doesn't mean to widen

 Insert picture description here

2. Problems in the development process

2.1 Multiple cpp Only run where 1 individual

  • In a normal project , Even if there are multiple cpp file , There can only be 1 individual cpp In file main function , Otherwise you will report an error
  • The project is run from main() The function starts with ,main() In which CPP In file , Run from this CPP Of documents main() Start .
  • If you want to run one by one cpp file , Please create multiple projects , Or exclude the previous one from the project main Function file ( Right click on the file —— Exclude... From the project , This operation will not delete the file , Just exclude the file from the current project .), Add next contains main Function file .

Reference resources

3. Error reporting solution

3.1 error C1128

3.1.1 Error resolution

according to /bigobj (Increase Number of Sections in .Obj file)

 Insert picture description here

Project solutions -> Right click , Click properties -> C/C+±> Command line -> The other options -> Join in :/bigobj-> Click application
 Insert picture description here

Reference resources :

3.1.2 The reason for the error

Reference resources :vs2017 Debug error :Error:C1128 The number of sections exceeds the object file format limit : Please use /bigobj Compile

The addressing of the object file exceeds 2^16=65536, So we need to use /bigobj Increase the address capacity to 2^32=4;

原网站

版权声明
本文为[Ton ton does not fight wild]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221327205701.html