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

Linker error unresolved external symbol simdjson::internal::error_code_info #2152

Closed
hongxinGuo opened this issue Mar 18, 2024 · 2 comments
Closed

Comments

@hongxinGuo
Copy link

It is OK when include the simdjson.h and simdjson.cpp into my project directly. The compiler report LNK2001 error when using the vcpkg simdjson package.
os: windows x64
compiler: VS2022
simdjson version: 3.8.0

You can reproduct it by goto https://github.com/hongxinGuo/FireBird, download the branch vcpkg_simdjson_LNK2001_error.

Guo

@lemire
Copy link
Member

lemire commented Mar 19, 2024

It is OK when include the simdjson.h and simdjson.cpp into my project directly.

That's often simple. There is nothing wrong with it.

You can reproduct it by goto https://github.com/hongxinGuo/FireBird, download the branch vcpkg_simdjson_LNK2001_error.

We are supported by vcpkg. You can check the demonstration at https://github.com/simdjson/simdjson-vcpkg

You can test it out for yourself: CMake will generate a Visual Studio project which you can build.

The most likely explanation of your trouble is that you have a misconfiguration as part of your Visual Studio solution or with vcpkg. If you think that there is a problem with vcpkg and you have followed their instructions, then you should raise an issue with vcpkg.

If you think that there is a bug in simdjson, please provide an example of your issue using CMake, as this is the build system we directly support.

I am not a Visual Studio expert, but let us consider the build settings from your main branch:

Screenshot 2024-03-18 at 7 58 20 PM Screenshot 2024-03-18 at 8 00 36 PM

Here are the new settings...

Screenshot 2024-03-18 at 7 58 26 PM Screenshot 2024-03-18 at 8 01 14 PM

So, at a glance, you have removed entirely simdjson from your Visual Studio configuration.

That means that you must rely on Visual Studio integration with vcpkg. This requires some work. You have not provided details. If you have not done some, please review the appropriate documentation :

https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-msbuild?pivots=shell-cmd

@lemire lemire closed this as completed Mar 19, 2024
@lemire
Copy link
Member

lemire commented Mar 19, 2024

I have closed the issue.

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