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

"definition is marked dllimport" when building with mingw32-w64 #2906

Closed
PetePriority opened this issue May 26, 2022 · 1 comment
Closed

Comments

@PetePriority
Copy link

I am using fmt in my project like so:

FetchContent_Declare(fmt
  GIT_REPOSITORY https://github.com/fmtlib/fmt.git
  GIT_TAG master
)
FetchContent_MakeAvailable(fmt)

[...]

target_link_libraries(mytarget PRIVATE [...] fmt::fmt)

This works fine on Linux, however, if I try to compile this using mingw-w64 I get:

/workdir/buildwin/_deps/fmt-src/include/fmt/core.h:588:29: error: function ‘void fmt::v8::detail::error_handler::on_error(const char*)’ definition is marked dllimport
  588 |   FMT_NORETURN FMT_API void on_error(const char* message) {

Am I missing any compile definitions for WIN32?

@vitaut
Copy link
Contributor

vitaut commented May 27, 2022

Should be fixed in 4f9311e. Thanks for reporting.

@vitaut vitaut closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants