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

Link error on 6.1.0 #1445

Closed
egorpugin opened this issue Dec 3, 2019 · 4 comments
Closed

Link error on 6.1.0 #1445

egorpugin opened this issue Dec 3, 2019 · 4 comments

Comments

@egorpugin
Copy link
Contributor

egorpugin commented Dec 3, 2019

Custom build system, worked fine on 6.0.0 and before, error after 6.1.0 update.
Dll build + build with sources (non header only).
Is there something on my side or it's a bug?

error LNK2019: unresolved external symbol "void __cdecl fmt::v6::internal::assert_fail(char const *,int,char const *)" (?assert_fail@internal@v6@fmt@@YAXPEBDH0@Z) referenced in function "class stdext::checked_array_iterator<char *> __cdecl fmt::v6::internal::format_decimal<char,unsigned int,class stdext::checked_array_iterator<char *>,class <lambda_18a81b6c877b6827ad6aa98de427f027> >(class stdext::checked_array_iterator<char *>,unsigned int,int,class <lambda_18a81b6c877b6827ad6aa98de427f027>)" (??$format_decimal@DIV?$checked_array_iterator@PEAD@stdext@@V<lambda_18a81b6c877b6827ad6aa98de427f027>@@@internal@v6@fmt@@YA?AV?$checked_array_iterator@PEAD@stdext@@V34@IHV<lambda_18a81b6c877b6827ad6aa98de427f027>@@@Z)
fatal error LNK1120: 1 unresolved externals
@egorpugin
Copy link
Contributor Author

egorpugin commented Dec 3, 2019

Added FMT_API in core.h and FMT_API in format-inl.h and it worked.

FMT_API
void assert_fail(const char* file, int line, const char* message);

and

FMT_API FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
  print(stderr, "{}:{}: assertion failed: {}", file, line, message);
  std::abort();
}

@vitaut
Copy link
Contributor

vitaut commented Dec 3, 2019

Could you submit a PR?

@egorpugin
Copy link
Contributor Author

Sure.
#1446

@egorpugin
Copy link
Contributor Author

Probably it's worth it to create test that reproduces this issue (dll build). But I don't have time to work on it.

@vitaut vitaut closed this as completed Dec 3, 2019
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