I recently started working at a new company and inherited an old codebase. The current codebase is written primarily in C with some C++ classes thrown in here and there, but the C++ classes only use C libraries.
The company wants us to update the code, but to ensure we don't negatively impact performance I wanted to benchmark the existing code. I created a simple logging class, but the code doesn't compile with the error : #1965 cannot open source file "iostream".
Please note: I have never worked with Eclipse or Code Composer Studio. I also come from a software engineering background, so my electronics experience is limited.
My first thought was to get the latest version of libcxx, but that didn't work. I then found a post by George Mock (here) that advised against importing libcxx directly.
I tried Updating Providers: Selected CDT Cross GCC Built-in Compiler Settings from Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers, and update the Command to get compiler specs to : g++ -std=c++14 -E -P -v -dD "$({INPUTS}" (based on suggestion from another forum post), but that also didn't resolve the issue.
I've included an image of the first set of compile-time errors. The resource called Logger is the class I created. If I exclude that class (which uses <iostream> and <unistd.h>) from the build, it compiles without errors.
NOTE: This code base has been in continuous production since 2004 and is very messy. No coding standards were followed and there are no tests. All these things will be implemented once I can get the code to see the C++ std libraries and compile.
I would very much appreciate if someone could give me some guidance in getting this working.
My environment is as follows.
Ubuntu 20.04
Code Composer Studio 11.2.0.00007
XDC Tools 3.55.02.22 core
Processor SDK : RTOS AM57xx 06.03.02.08