Closed Kojoley closed 10 years ago
As I understand you were using MinGW-4.8 with "-Wpedantic" flag.
I've committed a temporary-fix and now working on a better solution. (Line 185 in shared_library_impl.hpp is not the only place where such casts may occur.)
Yes I do (-Wall -Wextra -pedantic
). I'm not sure if -Wpedantic
enables -fpermissive
(I was thinking that it just enables warnings as mentioned in GCC docs wich says Valid ISO C and ISO C++ programs should compile properly with or without this option
)
Thanks for you work!
I got next error:
It can be fixed with using
reinterpret_cast
but casting between pointer-to-functionvoid(*)()
and pointer-to-objectvoid*
will cause such warning which is described on dylsym page. SinceGetProcAddress
could be used to get address for objects too, I can't propose a simpler way to workaround this issue than just suppress this error with using static_assert for ensuring that sizes of both pointers are equal (inshared_library.hpp
).