plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

GutsherrBus9 avatar image
GutsherrBus9 asked FlyingRaccoon commented

GDi+ compilation failes in package builder.

I'm trying to build a basic gauge with WASM that uses GDi+. Upon compiling in VS 2022 I get no errors but the package builder fails the compilation step. I followed all steps from Creating WASM Gauges (flightsimulator.com) and the gauge is very basic and has been derived from the Bitmap example with care. The latest SDK from the SU12 beta is installed and I got a fresh VS 2022 installation. Have I missed any setting in VS thats maybe not documented?1677346953694.png

gaugeswasmgdi+
1677346953694.png (273.8 KiB)
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image
FlyingRaccoon answered

Hello @GutsherrBus9

It looks like you are not correctly providing these function's implementation.
Have you added the gdiplus.a reference to your dependencies as explained here?
GDI+ (flightsimulator.com)

As an alternative, you can also include the WasmGdiPlus.vcxproj directly in your solution.

Regards,
Sylvain

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

GutsherrBus9 avatar image
GutsherrBus9 answered FlyingRaccoon commented

@FlyingRaccoon thanks for the answer. Thanks for the quick reply. I have seen the page and now investigated the error a bit more and found an error in the documentation that was causing this. The following line reading

  • Additional library directories: Additional Library Directories += $(MSFS_SDK)WASM\include

should actually be

  • Additional library directories: Additional Library Directories += $(MSFS_SDK)WASM\lib

Working now, thanks again!

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image FlyingRaccoon ♦♦ commented ·
That's right. We will fix this.

@Nocturne FYI

Regards,
Sylvain

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.