Skip to content

Commit

Permalink
Checking workaround for ld.exe bug
Browse files Browse the repository at this point in the history
There is a bug in ld.exe as supplied by mingw
workaround is to copy .dll but not .lib file to a place where ld will see it.
msys2/MINGW-packages#15469
  • Loading branch information
ralmond committed Jul 17, 2023
1 parent bd77036 commit e3fd12f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#*#
\#*
*.o
*~
.Rproj.user
Expand All @@ -20,5 +20,4 @@ Makevars
aclocal.m4
./
config.h
#DESCRIPTION#
symbols.rds
3 changes: 2 additions & 1 deletion R/Edges.R
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ setMethod("[[","NeticaNode", function(x, i, j, ..., drop=FALSE) {
stop("Expected an active netica node, got",x)
}
if (!IsNodeDeterministic(x)) {
warning("Use of '[[' with chance nodes is depricated: Use numericPart and '['.")
## Suppress the warning as it is RStudio is triggering it randomly
##warning("Use of '[[' with chance nodes is depricated: Use numericPart and '['.")
}
## Massage selection into a matrix of numeric indexes, EVERY_STATE
## values are only recognized on setting values, so expand them
Expand Down
56 changes: 28 additions & 28 deletions src/Makevars.winin
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
NETICA_HOME = @NETICA_HOME@
ifeq "$(WIN)" "64"
NETICA_LIB = ${NETICA_HOME}/lib64
INSTALL_LIB = ${R_PACKAGE_DIR}/libs/x64
LONG_SIZE = 8
else
NETICA_LIB = ${NETICA_HOME}/lib
INSTALL_LIB = ${R_PACKAGE_DIR}/libs/i386
LONG_SIZE = 4
endif

PKG_LIBS = -L. -L${INSTALL_LIB} -lNetica
PKG_CFLAGS = -I. @NETICA_CFLAGS@ -DLONG_SIZE=${LONG_SIZE}

.PHONY: all NeticaDLL clean

all: $(SHLIB)
$(SHLIB): NeticaDLL


NeticaDLL:
mkdir -p "$(INSTALL_LIB)"
cp "${NETICA_LIB}/Netica.dll" "${INSTALL_LIB}"
cp "${NETICA_LIB}/Netica.lib" "${INSTALL_LIB}"

clean:
Netica/clean.win
rm config.h
NETICA_HOME = @NETICA_HOME@
ifeq "$(WIN)" "64"
NETICA_LIB = ${NETICA_HOME}/lib64
INSTALL_LIB = ${R_PACKAGE_DIR}/libs/x64
LONG_SIZE = 8
else
NETICA_LIB = ${NETICA_HOME}/lib
INSTALL_LIB = ${R_PACKAGE_DIR}/libs/i386
LONG_SIZE = 4
endif
PKG_LIBS = -L. -l:Netica.dll
PKG_CFLAGS = -I. @NETICA_CFLAGS@ -DLONG_SIZE=${LONG_SIZE}
.PHONY: all NeticaDLL clean
all: NeticaDLL
NeticaDLL:
cp "$(NETICA_LIB)/Netica.dll" .
mkdir -p "${INSTALL_LIB}"
cp "${NETICA_LIB}/Netica.dll" "${INSTALL_LIB}"
cp "${NETICA_LIB}/Netica.lib" "${INSTALL_LIB}"
clean:
Netica/clean.win
rm config.h Netica.dll

0 comments on commit e3fd12f

Please sign in to comment.