Closed perdrix52 closed 1 year ago
What is the question?
I asked if the changes I made to the header was the recommended way to fix the problem I reported here.
No, it is not.
The snippet disables the import / export modifier used in MS Windows. Of course, it can work under different environment but it won't in a MS pure environment, especially if the compiler is Visual C++ for instance.
OK If that's not the recommended way to get it to build as a static library, and be able to link with an application, please advise what change I should make. It absolutely does work in a VS C++ environment as I'm using the static library right now
To clarify if I build it as a static library SMTP_MIME_LIBRARY should resolve to nothing (as per the last line of my original post). It can't be either declspec(dllexport) or declspec(dllimport) as both those prevent the link from working.
@perdrix52 , the project is not really meant to be compiled as a static library. But you if the method you described works, you are free to use it.
I built the project as a static library which went well, but linking want totally all over the place
In the end I changed smtpmime_global.h
if (0)
ifdef SMTP_MIME_LIBRARY
define SMTP_MIME_EXPORT Q_DECL_EXPORT
else
define SMTP_MIME_EXPORT Q_DECL_IMPORT
endif
endif
define SMTP_MIME_EXPORT
Is that the recommended way to handle this?
Thank you David