Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with current version of MinGW64 and add _declspec(dllexport/import) #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pischky
Copy link

@pischky pischky commented Jul 20, 2023

  1. New Make file "mingw64.mak" to build on current version of MinGW64.
  2. added _declspec(dllexport) and _declspec(dllimport) for MinGW64

I had problems with autotools fails on current version of MinGW64 so I wrote a minimalistic Makefile for use with MinGW64 only. It is incomplete that the "install" step is missing, but works for libserialportCS.

From some tutorial about building DLLs with MinGW64 I assume that declarion of the funtctions of the DLL as dllexport is best way. So you should also use dllimport when using the DLL.

This works with libserialportCS. Testing with C or C++ is still missing.

libserialport.h: added SP_API __declspec(dllexport) and __declspec(dllimport) for MinGW54
libserialport_internal.h: added LIBSERIALPORT_MINGW64BUILD
…limport) for MinGW54

libserialport_internal.h: added LIBSERIALPORT_MINGW64BUILD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants