You can create a small project or executable file outside the main application, which is compiled and created separately as part of your own solution. However, this small application will have the required command line argument, which is necessary to work with your main application with which you want to test. The command line argument is the path to the place where the main path or directory of the project folder is located, which will contain the header file that works with this external application. Then, depending on which IDE you are using, you will need to make some settings for your IDE to configure the correct paths.
For example, if you work in MS Visual Studio. You can right-click on the launch project and select properties, and then on the properties page on the left side there is a section called Build Events , and then, if you expand this section, you will get three options: Pre-Build Event , Pre-Link Event and Post-Build Event all three of them have the same fields on the right side for their settings: Command Line , where you will need to set your paths, Description all that you want to use to describe the build event command, and Use In Build which in basically is a boolean switch Y/N
Now the other IDEs will differ in how they are configured and options are available, but something like that may suit your needs. Forgive me in the example above, which uses Microsoft Visual Studio, since I am not familiar with Linux. However, I believe that something like this can be done; it's just a matter of knowing your compiler, linker, and debugger.
Francis cugler
source share