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

Export assert_fail with FMT_API. This fixes dll build. #1446

Merged
merged 2 commits into from
Dec 3, 2019
Merged

Export assert_fail with FMT_API. This fixes dll build. #1446

merged 2 commits into from
Dec 3, 2019

Conversation

egorpugin
Copy link
Contributor

See #1445

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

@egorpugin egorpugin mentioned this pull request Dec 3, 2019
@@ -55,7 +55,7 @@ inline fmt::internal::null<> strerror_s(char*, std::size_t, ...) { return {}; }
FMT_BEGIN_NAMESPACE
namespace internal {

FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
FMT_API FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FMT_API is not needed here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, maybe. First, I thought header goes to users, but it seems it is fmt internal stuff?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, tested, works without it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for the opt-in header-only mode and effectively an internal header.

@vitaut
Copy link
Contributor

vitaut commented Dec 3, 2019

Thanks!

@vitaut vitaut merged commit a64f60c into fmtlib:master Dec 3, 2019
@kayaalp
Copy link

kayaalp commented Aug 21, 2020

I just pulled the most recent build 7.0.3, but still see the same problem mentioned here.

1>------ Rebuild All started: Project: TMP, Configuration: Debug Win32 ------
1>Source1.cpp
1>Source1.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl fmt::v7::detail::vformat(class fmt::v7::basic_string_view,struct fmt::v7::format_args)" (?vformat@detail@v7@fmt@@ya?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$basic_string_view@D@23@Uformat_args@23@@z) referenced in function "class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl fmt::v7::format<char [11],char const (&)[6],char>(char const (&)[11],char const (&)[6])" (??$format@$$BY0L@DAAY05$$CBDD@v7@fmt@@ya?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AAY0L@$$CBDAAY05$$CBD@Z)
1>C:\Users<user>\source\repos\TMP\Debug\TMP.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "TMP.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

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

Successfully merging this pull request may close these issues.

3 participants