-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Compile error on VS2019 x86 #1596
Comments
I can build the following code with spdlog v1.6.1 on Visual Studio 2019 16.6.2 (14.26.28801). #include <spdlog/spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <memory>
int main(int, char**)
{
auto logger = spdlog::basic_logger_mt("foo", "foo.txt");
logger->info("Hello, World!");
return 0;
} $ mkdir build
$ cd build
$ cmake .. -G "Visual Studio 16 2019" -A Win32
-- The C compiler identification is MSVC 19.26.28806.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x86/cl.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is MSVC 19.26.28806.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x86/cl.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.6.1
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Build type: Release
-- Generating example(s)
-- Generating install
-- Configuring done
-- Generating done
-- Build files have been written to: (omit)/spdlog/build
$ cmake --build . --target
(omit)
$ Debug\foo
$ type foo.txt
[2020-06-19 10:24:47.849] [foo] [info] Hello, World! <\details> Could you provide snippet to reproduce? |
In your example above, it appears that you are using the spdlog lib to link to the HelloWorld example.
Then it fails as noted above |
MSVC 19.21.27702.2 has template problem: https://developercommunityapi.westus.cloudapp.azure.com/content/problem/535251/msvc-1920275081-does-not-accept-a-simple-tempate-t.html |
Confirmed that it DOES indeed build with version 19.26.28806.0 |
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
We have a customer that is using VS 2019 32-bit / the x64 version builds just fine.
Here is the output from compiling
file_sinks.cpp
I did see a bugs posted against fmtlib here and here.
But since we are using the latest version of fmtlib, both bug-fixes have been incorporated into our code base.
Please advise
Thanks in advance
The text was updated successfully, but these errors were encountered: