openwch / ch32v307

Including the SDK、HDK、Datasheet of RISC-V MCU CH32V307 and other relevant development materials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can projects using MounRiver Studio include c++ files? If so, how?

KurtE opened this issue · comments

commented

Sorry, I know this has probably been asked in the past or is something obvious.

But I do not see any of the example programs, that include C++, except the uart_server_rtt
And it does not appear to have a .wvproj file associated with it, but instead just a .project
file.

Not sure how to build it? Will probably try translating the .md file to see if any hints.

But assuming it is possible to use the studio to create a new project, it would be great if one could create one with lets say main.cpp instead of main. And have it build.

And/Or - the how to change the settings for a project to add such support.

Thanks
Kurt

You can create a C++ project based on MRS, first build a main.c project, and then modify the configuration to make the .cpp file call the C++ compiler to compile.Detailed steps in https://github.com/openwch/ch32v307/tree/main/C%2B%2B

commented

Thanks you.