Hi
This question has been asked before but I can't seem to apply the answer in my case, and I am seeing other strange behavior in my project.
I have both .h and .cpp files I'd like to share between executables. I currently have a main.cpp and main2.cpp, both with an app_main() defined and both being included as COMPONENT_SRCS in the CMakeLists.txt. I have the following anomalies:
1. The project successfully compiles even though app_main is defined twice (in different files).
2. Even though the project compiles, the editor produces a red underline indicating an unresolved inclusion (for #include of header files) and "symbol GPIO_NUM_25 could not be resolved" for constants and variables. The redlines therefore mean nothing to me...
3. To produce multiple executables from one project, others have suggested creating two configurations (which I take to mean application configurations) and then excluding the "opposite" main from each configuration by right clicking on the main.cpp file, selecting Resource Configurations->Exclude from build... However, both options available under "Resource Configurations" (ie, Exclude from build and Reset to Default) are greyed out such that they cannot be clicked upon.
I've search the web wide and far and can't seem to find an approach to my problems. I was getting a error (something like Incorrect Build Configuration) upon cleaning the project, but I found a problem report with a work around to that issue.
So, I believe I have done my due diligence to resolve my questions on my own, but am still befuddled. Any help would be appreciated.
Tom
How to generate multiple executables from single project and other anomolies
Re: How to generate multiple executables from single project and other anomolies
PS. The "Build not configured correctly" has returned despite my doing the work around: File->Restart.
Who is online
Users browsing this forum: Google [Bot] and 114 guests