vjalle
vjalle

Reputation: 973

Using vxlapi.dll with GCC (MSYS2/UCRT64) instead of MSVC?

I need to use the Vector XL driver library (vxlapi64.dll) in an application built with GCC (MSYS2, MinGW/UCRT64, anything).

The application built with MSVC works, but the app built with any GCC variant crashes at various locations (e.g., in xlOpenPort(), but in another version it got past that and crashed inside xlCanTransmit()) with an exception (segfault). The crash is happening inside the dll, not in my code.

Many other functions work properly, e.g. I can list all channels, assign channels to my application, set the bitrate, acceptance masks, even receive frames correctly! But transmission only works from MSVC.

The issue can be reproduced with this very simple code: github.com/gsp-p-77/vxlapiCanTrace (only one cpp file) Here xlOpenPort() will crash with GCC.

What can be the reason? Is there some workaround for GCC to behave in a similar way to MSVC? All the APIs in the DLL are plain C.

Upvotes: 0

Views: 39

Answers (0)

Related Questions