MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
HBilliet
Posts: 28
Supporter
Hello,

I'm learning everything about SimConnect and WASM, and write my own "connector" (reason is that I don't use Arduino, but PIC-microcontroller based HW). The source-code on https://github.com/MobiFlight is a great source to learn.

I am using VS2019 and am able to build the "MobiFlight-Connector" solution completely. I can run it from my VS2019 environment allowing me to set breakpoints and study the code.

But I have a problem with the "MobiFlight-WASM-Module". I get errors like the below.

For example, all my "std::string" are underlined, and if I hover over them, I get below error (no clue how to upload a screenshot :confused: ):
iconCode:
{} namespace std
no instance of constructor "std::__2::basic_string<_CharT, _Traits, _Allocator>::basic_string [with _CharT=char, _Traits=std::__2::char_traits<char>,_Allocator=std::__2:allocator<char>]" matches the argument list
      argument types are: (const char *)


Any ideas?

PS. Can I upload images in this forum? Pressing the "Image" button does give me the "img" tags, but no clue what I should put between them?
2021-12-26 21:05
Avatar
HBilliet
Posts: 28
Supporter
Ok, update on my previous question.

If I scrolled down in the long error list, I found something related to the "Post-Build Event". The Command Line contains the below:

iconCode:
mkdir "$(SolutionDir)..\..\PackageSources\modules"
copy /Y "$(TargetPath)" "$(SolutionDir)..\..\PackageSources\modules"
copy /Y "$(TargetDir)events*.txt" "$(SolutionDir)..\..\PackageSources\modules"


Because I had issues with "Post-Build Event" before, I removed this Command Line completely. And now the code is building without errors. But I still see the same errors as above (underlined curly lines), but looks like they don't have effect? Weird!
2021-12-26 21:34
Avatar
HBilliet
Posts: 28
Supporter
I posted my question on StackOverflow as well (https://stackoverflow.com/questions/70493574/stdstring-gives-errors-in-vs2019), and there I got the answer that Intellisense can sometimes get confused, and I should ignore the error if build is successful. So there seems no problem.

I build the DEBUG version of "StandaloneModule.wasm" and copied it in the Community folder, and it works perfectly as far as I can see. Now I can follow the traces to the Console window, and even add some more to allow me to analyze the code.

Great stuff!!!
2021-12-27 10:40
icon