Using Common Configuration Files in VS Projects with C++

Using Common Configuration Files in VS Projects with C++

When working on a solution in Visual Studio (VS) that contains multiple projects, it is common to encounter situations where multiple projects need to include the same configurations, such as C++ version, additional library directories, additional include directories, etc. This article provides methods to include common configuration files to avoid repetitive configurations. 1. Configure Third-Party … Read more

Setting the Default Startup Project in CMake for Visual Studio: No Longer ALL_BUILD

Setting the Default Startup Project in CMake for Visual Studio: No Longer ALL_BUILD

The default startup project generated by <span>cmake</span> is <span>ALL_BUILD</span>. We want to specify the default startup project so that we don’t have to set it every time we open the <span>.sln</span> file. This was not possible before <span>cmake 3.6</span>. After <span>cmake 3.6</span>, it can be accomplished by setting the <span>VS_STARTUP_PROJECT</span> property. 1. Core Setting Statement … Read more

How to Develop a Desktop Software Using Qt, VS, and C++ (Simple, Fun, Detailed)

How to Develop a Desktop Software Using Qt, VS, and C++ (Simple, Fun, Detailed)

Currently updated to the point where we can write a calculator [The interface can be seen at the end]. ① This tutorial is suitable for Recommended readers: Beginners in VS + QT. ② Prerequisite installation VS2019 or 2022 Community Edition (This is too simple, so I won’t write it here!) It is recommended to refer … Read more

Solutions for GCC Errors

Solutions for GCC Errors

This error indicates that the system cannot recognize the gcc command, which is usually due to the GCC compiler not being installed or not being added to the system PATH environment variable. Here are the solutions: ### 1. Install MinGW-w64 (GCC environment for Windows) “`bash # 1. Download the MinGW-w64 installer # Visit https://winlibs.com/ to … Read more

C Language Animation: Spinning Circles | Water Ripple Effect

C Language Animation: Spinning Circles | Water Ripple Effect

Drawing water ripples in C language: This is a static image captured during runtime, but it is actually animated. After running the code, each circle on the left and right continuously spins and expands, resembling the rippling effect of water. Please see the video effect at the bottom.Main idea: Set the origin coordinates, divide into … Read more

Compiling and Debugging Fluent UDF with Visual Studio and CMake

Compiling and Debugging Fluent UDF with Visual Studio and CMake

This article introduces the method of compiling and debugging Fluent UDF using Visual Studio and CMake. Note: This article refers to the article published by <span>Jiaoran Today What to Play</span> at https://zhuanlan.zhihu.com/p/492619039, and I extend my highest respect to the author’s spirit of sharing. ” There are many methods for compiling Fluent UDF. As a … Read more

Compiling OpenCV 4.8.1 with CMake and Visual Studio 2022 on Windows

Compiling OpenCV 4.8.1 with CMake and Visual Studio 2022 on Windows

1. Background The project I am currently maintaining runs on Windows and uses OpenCV version 4.5.2. My local development environment is a Mac, and I am using the newer OpenCV version 4.8.1. To maintain consistency with my local development environment, I plan to upgrade the OpenCV used in the project, as the project still utilizes … Read more

Calling Python from C++

Calling Python from C++

Click the above“Mechanical and Electronic Engineering Technology” to follow us 1. Configure Header Files Add the include directory under the Python installation directory to the header file directory. The operation path in Visual Studio 2022 is: Properties –> C/C++ -> General-> Additional Include Directories C:\Users\AppData\Local\Programs\Python\Python39\include 2. Configure lib Directory Add Python39.lib to the compilation link. … Read more

Calling C/C++ Functions from Assembly Language: Multiplication Table Example

Calling C/C++ Functions from Assembly Language: Multiplication Table Example

Click the blue text Follow us Source from the Internet, please delete if infringing Now let’s write a simple application that prompts the user to input an integer and multiplies it by powers of 2 (2¹ to 2ⁿ) using bit shifting, displaying each product with leading spaces. The input-output will use C++. The assembly module … Read more