File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -50,13 +50,22 @@ jobs:
5050 # Use MinGW 32-bit environment
5151 export PATH="/mingw32/bin:$PATH"
5252 export PKG_CONFIG_PATH="/mingw32/lib/pkgconfig"
53- export CGO_CFLAGS="-I/mingw32/include"
53+
54+ # Convert paths to mixed mode (Windows style with forward slashes) for CGO
55+ _INCLUDE_PATH=$(cygpath -m /mingw32/include)
56+ _LIB_PATH=$(cygpath -m /mingw32/lib)
57+
58+ export CGO_CFLAGS="-I${_INCLUDE_PATH}"
5459
5560 export CGO_ENABLED=1
5661 export GOOS=windows
5762 export GOARCH=386
58- # Force static linking for MinGW-w64
59- export CGO_LDFLAGS="-L/mingw32/lib -lyara -lws2_32 -limagehlp -static"
63+
64+ # Check if library exists
65+ ls -l /mingw32/lib/libyara.a
66+
67+ # Force static linking for MinGW-w64 with full paths
68+ export CGO_LDFLAGS="-L${_LIB_PATH} -lyara -lws2_32 -limagehlp -static"
6069
6170 go build -v -ldflags "-s -w -extldflags '-static'" -tags yara_static,yara_no_pkg_config -o fastfinder-386.exe .
6271 ls -l fastfinder-386.exe
You can’t perform that action at this time.
0 commit comments