sw icon indicating copy to clipboard operation
sw copied to clipboard

Building a project with Tesseract as dependency? Fails with a missing .lib

Open myrkraverk opened this issue 3 years ago • 2 comments

Ok, so a few days ago I built Tesseract, basically using the instructions on their website.

Now I am trying to use it in a project of my own.

Adding it as a dependency is easy. This seems to work. t += "org.sw.demo.google.tesseract.tesseract-master"_dep;

However, this project of mine fails to build with

Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [myproject-0.0.1].exe LINK : fatal error LNK1181: cannot open input file 'C:\Users\user\.sw\storage\pkg\b4\5b\9b5b\obj\bld\896221\lib\org.sw.demo.google.tesseract.tesseract-master.lib' command failed: exit code = 1181 (0x49D) Total errors: 1

Why didn't it build the .lib file in the first place? And how do I make it build it now? The command I am using to build is just plain old sw build with no embellishments.

myrkraverk avatar Aug 03 '21 23:08 myrkraverk

I should clarify, at the time of my build test, there was nothing in this directory.

C:\myproject>dir/w C:\Users\user\.sw\storage\pkg\b4\5b\9b5b\obj\bld\896221\lib Volume in drive C is NAME Volume Serial Number is AAAA-BBBB

Directory of C:\Users\user\.sw\storage\pkg\b4\5b\9b5b\obj\bld\896221\lib

[.] [..] 0 File(s) 0 bytes

myrkraverk avatar Aug 04 '21 00:08 myrkraverk

Hi,

org.sw.demo.google.tesseract.tesseract-master is the tess executable. You need org.sw.demo.google.tesseract.libtesseract-master.

egorpugin avatar Aug 04 '21 04:08 egorpugin