F2I-Consulting / fesapi

API for ENERGISTICS™ data standards (mainly RESQML™), multi-languages (C++, Java, C#, Python)
Apache License 2.0
34 stars 24 forks source link

Importing inline functions in MinGW #347

Closed behzaadh closed 3 months ago

behzaadh commented 3 months ago

What are the steps to reproduce this issue?

  1. Using MINGW64 to build the library

What does happen?

I managed to build the library. However, when I want to run the example, I get the following error: "'dllimport' attribute ignored on inline function"

What were you expecting to happen?

I guess there is a problem in mingw to link inline functions

Any logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?

What versions of fesapi are you using?

2.9.0.1

philippeVerney commented 3 months ago

Hi Behzad, We have no experience at all with Mingw64 and FESAPI. So, we have no direct answer. If it is possible for you to use VS (community edition for instance), it would help but, I guess you cannot.

At a first glance, your "error" message" looks like a "warning", not like an error. Ignoring this attribute may be totally correct. How do you know that the example fails? Is there another error message? Cannot you see anything? Is there a seg fault?

behzaadh commented 3 months ago

Hi Philippe,

I removed DLL_IMPORT_OR_EXPORT at the beginning of all functions and made a few changes in the CMake files, then rebuilt the library. Now, everything works and the examples run as they should. I don't know why DLL_IMPORT_OR_EXPORT causes the issue in MinGW.