node-native-ocr icon indicating copy to clipboard operation
node-native-ocr copied to clipboard

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

Open ahmedmukhtar1133 opened this issue 4 years ago • 7 comments

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 avatar Oct 04 '21 21:10 ahmedmukhtar1133

Same error with python v2.7 image

ahmedmukhtar1133 avatar Oct 05 '21 20:10 ahmedmukhtar1133

@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?

jschlight avatar Oct 07 '21 02:10 jschlight

@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 .

ahmedmukhtar1133 avatar Oct 07 '21 08:10 ahmedmukhtar1133

@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.

jschlight avatar Oct 08 '21 23:10 jschlight

  • 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 avatar Oct 09 '21 20:10 ahmedmukhtar1133

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

ahmedmukhtar1133 avatar Jan 21 '22 17:01 ahmedmukhtar1133

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.

ahmedmukhtar1133 avatar Jan 21 '22 20:01 ahmedmukhtar1133