Author Topic: MounRiver Studio 2 - does not compile C++ programs at all?  (Read 1176 times)

0 Members and 1 Guest are viewing this topic.

Offline dmderevTopic starter

  • Contributor
  • Posts: 36
MounRiver Studio 2 - does not compile C++ programs at all?
« on: January 10, 2025, 04:09:05 am »
I downloaded MounRiver studio 2 (the one based on VScode) and tried to develop some code for CH32V003, using its own and then CH32V003fun libraries. When the program is written in C (or has *.c filename) it somewhat works, however, there are glitches. There is a panel to specify include paths that allows to specify -I paths and -isystem paths to my libraries.
However, when I list the -I mylibs, they are not found. If I list the path in -isystem panel, the quoted #include ".." are found. It is strange because the -isystem is supposed to specify paths for #include <..>, so it looks like a bug.
But when I change file extension to *.cpp for my code or for included examples, the compiler completely fails to find any #includes.
Tracing it to the root, it looks that c++ compiler uses a different set of settings, and they are not accessible from GUI (project properties).
The  *.wvproj json file contains two sections: "ccompiler":  and "cppcompiler":. The first one defines all switches for C compilation and that is what is set from project properties window. The other one contains empty entries:
"includes": {"include_paths": [],
      "include_system_paths": [],
      "include_files": [] }.
Probably they are supposed to define switches for C++ compilation, but because they are empty and not fillable from GUI, the paths cannot be specified.
I tried to add the definitions to project file manually in this section, but opening the project clears these fields and compiler does not work.
Did anyone manage to compile any C++ code and how?
Is it a bug in the tool? How to report this bug and any possible fixes?

The CH32V is a nice chip, but its IDE tools are bad: there is no compatibility between MounRiver and PlatformIO and it looks that the user has not only take care of bad documentation, but also debug and tweak the development tools - an extra barrier. 
 

Offline Jordan

  • Newbie
  • Posts: 1
  • Country: pl
Re: MounRiver Studio 2 - does not compile C++ programs at all?
« Reply #1 on: January 16, 2025, 07:23:17 pm »
Hi

I was also struggling with this a bit. You need to switch into c++ in order to have additional sections to configure includes and other settings for c++.
To achieve this you need just click at status bar right after bookmarks (left bottom side of application). There is the name of your project. After clicking this you will see options to switch to c++. I am attaching AGIF presenting it in details (zipped because this system stripped animation of the gif).

« Last Edit: January 16, 2025, 07:28:46 pm by Jordan »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf