Skip to content

Commit 56a6fec

Browse files
committed
try windows fix again
1 parent da27231 commit 56a6fec

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Makevars.win

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ PKG_CPPFLAGS = -I${RWINLIB}/include -I${RWINLIB}/include/leptonica -fvisibility=
66
PKG_LIBS = -L${RWINLIB}/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \
77
-L${RWINLIB}/lib \
88
-Wl,--whole-archive \
9-
-ltesseract -lleptonica \
9+
-ltesseract \
1010
-Wl,--no-whole-archive \
11-
-ltiff -lopenjp2 -lwebp -lsharpyuv -ljpeg -lgif -lpng16 -lz \
12-
-lws2_32 \
11+
-lleptonica \
12+
-ltiff -lopenjp2 -lwebp -lwebpmux -lwebpdemux -lsharpyuv -ljpeg -lgif -lpng16 -lz \
13+
-lws2_32 -lgdi32 \
1314
-Wl,--exclude-all-symbols \
1415
-static-libgcc -static-libstdc++
1516

16-
# For R 4.5.0 compatibility
17+
# For R 4.5.0 compatibility - using --version-script for symbol control
1718
ifeq ($(shell ${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e 'cat(as.numeric(R.version$$major) + as.numeric(R.version$$minor)/10)'),4.5)
1819
PKG_LIBS += -Wl,--version-script=../tools/exports.map
1920
endif
2021

22+
# Set C++11 standard as required by Tesseract
23+
CXX_STD = CXX11
24+
2125
# Compile
2226
all: clean winlibs exports.map
2327

@@ -30,8 +34,8 @@ exports.map: clean
3034
winlibs:
3135
mkdir -p ../inst
3236
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" ${VERSION}
33-
cp -Rf ../windows/tessdata ../inst/
34-
cp -Rf ${RWINLIB}/share/tessdata ../inst/
37+
cp -Rf ../windows/tessdata ../inst/ || true
38+
cp -Rf ${RWINLIB}/share/tessdata ../inst/ || true
3539

3640
$(SHLIB): $(OBJECTS)
3741

0 commit comments

Comments
 (0)