How to: Current Beta + Mingw

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
JosephAustin
Posts: 2
Joined: Tue Sep 11, 2012 7:05 am

How to: Current Beta + Mingw

Post by JosephAustin »

Hello community.

The company I work for recently decided to integrate these devices with our products. We ran into a major snag because of the Visual Studio stack checker being embedded in the .libs. We use Linux for all development and cross compile to Windows via Mingw, which is a bit strange but usually works until we encounter a VS specific dependency or a VC++ DLL. Our CTO threw out an idea and it turned out to work quite nicely. This can help anyone in a similar situation, whether in regards to this library or not. It also might simplify the use of the 3DX SDK if you need it only for the simplest case - start it, get some values.

If you have access to VS (as we do through a virtual machine... 2005 edition, ick) then you can always compile a brand new dll of your own that links in with any other VS library. Since this is the case, you can write your own interface to any library, keep it stripped down and pure C, and link it in to Mingw without issue. My DLL has only three functions: fire it up, retrieve some values from a windows message handle, and shut it down. I call this from a simple FLTK event handler that always knows the most recent MSG.

Header and source of simplified DLL are in the included zip file. Strange that I can upload a zip but not a .c and .h, from a security perspective.
Attachments
wrapperdll.zip
header and source
(1.34 KiB) Downloaded 832 times
Post Reply