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

Error LNK2019: unresolved external symbol "public: __cdecl tesseract::TessBaseAPI::TessBaseAPI(void)" #6

Open
ahmedmukhtar1133 opened this issue Oct 4, 2021 · 7 comments

Comments

@ahmedmukhtar1133
Copy link
Collaborator

Environment:

  • Python => 3.9
  • Node => 11.15 (Also tried using 14)
  • Node-Gyp => 8.2 (Globally installed) - But in error I can see => node-gyp -v v3.8.0
  • Npm => 6.7

Unable to install this package getting the following errors during build:

  • Error LNK2019: unresolved external symbol "public: __cdecl tesseract::TessBaseAPI::TessBaseAPI(void)"
  • fatal error LNK1120: 7 unresolved externals [C:\Users\MyUserName\Documents\project\node_modules\node-native-ocr\build\node-native-ocr.vcxproj]

See attached screenshots for reference
image
image
image

@ahmedmukhtar1133
Copy link
Collaborator Author

Same error with python v2.7
image

@jschlight
Copy link
Contributor

@ahmedmukhtar1133 Would it be possible to get the full build log, including the build command you are using to trigger the build, as plain text either pasted into a comment here or as a gist?

@ahmedmukhtar1133
Copy link
Collaborator Author

@jschlight I just ran the npm install command to install the dependencies.
Here is the complete npm debug log file attached.
File is huge, you might want to search through file node-native-ocr
2021-10-05T22_12_10_891Z-debug.log
.

@jschlight
Copy link
Contributor

@ahmedmukhtar1133 Thank you. I wasn't clear in my request. You sent what I asked for. I'm hoping to get a textual version of the console output in the screenshots you posted. Can you please verify the following software versions you are running:

  • Microsoft Windows
  • Visual Studio
  • CMake

I can confirm the code builds with Visual Studio Build Tools 2019. But it may not build with other versions.

@ahmedmukhtar1133
Copy link
Collaborator Author

  • Windows: 10
  • Visual Studio: 2017
  • Cmake: 3.21

As you suggested it might work with VS 2019 build tools, so I'll check again with vs 2019. Incase I get any errors then I'll provide you textual version of the console errors.

@ahmedmukhtar1133
Copy link
Collaborator Author

I've tried with VS 2019 build tools but it's still not working.

@ahmedmukhtar1133
Copy link
Collaborator Author

Finally, after trying different combinations have fixed this issue.

  • Windows: 10
  • Visual Studio (Build tools, C++ Packages, and Windows SDK): VS Build Tools 2019
  • Cmake: 3.21
  • Node: 14.16
  • Python: 2.7

Might help someone.

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