hello, I would need some help to compile the iemmatrix library for windows. I really would like to learn how to do this myself. (a small how to compile pd or externals on windows..). I found an old compiler called "vctoolkit 2003" on my system and a borland C++ compiler (5.5). And I know there is also the gcc for windows(?). But the procedure seems to be much more complicated than on linux. thanks for any advise... marius.
Marius Schebella wrote:
hello, I would need some help to compile the iemmatrix library for windows. I really would like to learn how to do this myself. (a small how to compile pd or externals on windows..). I found an old compiler called "vctoolkit 2003" on my system and a borland C++ compiler (5.5). And I know there is also the gcc for windows(?). But the procedure seems to be much more complicated than on linux. thanks for any advise...
hi, unfortunately i haven't yet started to do a makefile for iemmatrix on windows. so you would have to do your own one. shouldn't be that complicate though.
note that with the vctoolkit2003 there doesn't seem to come a make, so you need to get your own; i found a windows compile of Gnu/make on the web, and i like it very much.
releasing iemmatrix properly is really quite high on my todo list (it is just the ~-objects that are keeping me from doing so: me and thomas have to discuss a lot about it...)
mfg.asd.r IOhannes
Hallo!
borland C++ compiler (5.5). And I know there is also the gcc for windows(?). But the procedure seems to be much more complicated than on linux.
There is mingw and cygwin. But if you compile it with cygwin you will always need cygwin.dll, so I do it with mingw.
You shouldn't have to change much in the linux makefile to compile with mingw.
LG Georg
hi, Tried (both borland and mingw), but no luck, tried to patch the original makefile, and also comparing with thomas grills exemplary makefiles. but keeps flooding me with error messages. must be some bad mistake, I am producing...
thats my build.bat set PATH=D:\mingw\bin;%PATH% mingw32-make -f makefile.pd-mingw
thats my makefile (as you can easily guess from xsample) _____________________snipsnip_______________________________________ # xsample - extended sample objects for Max/MSP and pd (pure data) # Copyright (c) 2001-2004 Thomas Grill (xovo_AT_gmx.net) # # Makefile for gcc @ minGW # # usage: # to build run "make -f makefile.pd-mingw" # to install (as root), do "make -f makefile.pd-mingw install" #
CONFIG=config-pd-mingw.txt MAKEFILE=makefile.pd-mingw
include ${CONFIG}
# compiler stuff INCLUDES=$(PDINC)
FLAGS=-DFLEXT_SYS=2 CFLAGS=-O2 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions ${UFLAGS}
PDLIBS=$(PD)/bin/pd.dll $(PD)/bin/pthreadVC.dll
ifdef FLEXT_SHARED
CFLAGS+=-DFLEXT_SHARED FLEXTLIB=$(FLEXTPATH)/flext.dll
else
FLEXTLIB=$(FLEXTPATH)/flext-pdwin.lib
endif
# ---------------------------------------------- # the rest can stay untouched # ----------------------------------------------
NAME=iemmatrix
include make-files.txt
TARGET=$(TARGDIR)/$(NAME).dll
# default target all: $(TARGDIR) $(TARGET)
$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG) # echo touch $(patsubst %,$(SRCDIR)/%,$(SRCS)) # minGW has no touch
$(TARGDIR): -mkdir $(TARGDIR)
$(TARGDIR)/%.o : $(SRCDIR)/%.c $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(CXX) -shared $(LDFLAGS) $^ ${PDLIBS} $(patsubst %,-l%,$(LIBS)) -o $@ strip --strip-unneeded $@ chmod 755 $@
$(INSTDIR): -mkdir $(INSTDIR)
install:: $(INSTDIR)
install:: $(TARGET) cp $^ $(INSTDIR) # chown root.root $(patsubst %,$(INSTDIR)/%,$(notdir $^))
$(HELPDIR): -mkdir $(HELPDIR)
install-help:: $(HELPDIR)
install-help:: ./pd chmod 644 $^/*.* cp $^/*.* $(HELPDIR)
.PHONY: clean clean: rm -f $(TARGDIR)/*.o $(TARGET) _________________________________________________________________________________
and thats the errormessages...
D:\pd\iemlib\iemmatrix\src>mingw32-make -f
d:\pd\iemlib\iemmatrix\src\makefile.pd-mingw
g++ -shared iemmatrix.c mtx_binops.c mtx_check.c mtx_cholesky.c mtx_col.c
mtx_diag.c mtx_diegg.c mtx_distance2.c mtx_eg
g.c mtx_element.c mtx_eye.c mtx_inverse.c mtx_matrix.c mtx_mean.c
mtx_ones.c mtx_pivot.c mtx_print.c mtx_rand.c mtx_resi
ze.c mtx_roll.c mtx_row.c mtx_scroll.c mtx_size.c mtx_tilde.c mtx_trace.c
mtx_transpose.c mtx_zeros.c d:/pd/bin/pd.dll d
:/pd/bin/pthreadVC.dll -o D:/pd/iemlib/iemmatrix/iemmatrix.dll
mtx_binops.c: In function void mtx_bin_matrix2(t_mtx_binmtx*, t_symbol*, int, t_atom*)': mtx_binops.c:31: warning: converting to
int' from t_float' mtx_binops.c:32: warning: converting to
int' from t_float' mtx_binops.c:39: error: invalid conversion from
void*' to `t_atom*'
mtx_binops.c: In function void mtx_addscalar_matrix(t_mtx_binscalar*, t_symbol*, int, t_atom*)': mtx_binops.c:74: warning: converting to
int' from t_float' mtx_binops.c:74: warning: converting to
int' from t_float' mtx_binops.c: In function
void mtx_add_matrix(t_mtx_binmtx*, t_symbol*,
int, t_atom*)':
mtx_binops.c:108: warning: converting to int' from
t_float'
mtx_binops.c:109: warning: converting to int' from
t_float'
mtx_binops.c: In function `void mtx_add_float(t_mtx_binmtx*, t_float)':
mtx_binops.c:148: warning: converting to int' from
t_float'
mtx_binops.c:149: warning: converting to int' from
t_float'
mtx_binops.c: In function void mtx_add_setup()': mtx_binops.c:192: error: invalid conversion from
int' to t_atomtype' mtx_binops.c:192: error: initializing argument 6 of
_class*
class_new(t_symbol*, void*(*)(), void (*)(), size_t, int,
t_atomtype, ...)'
etc.... marius.
----- Original Message ----- From: "Georg Holzmann" grhPD@gmx.at To: "Marius Schebella" marius.schebella@chello.at Cc: pd-list@iem.at Sent: Monday, May 09, 2005 6:06 PM Subject: Re: [PD] compiling iemmatrix on windows
Hallo!
borland C++ compiler (5.5). And I know there is also the gcc for windows(?). But the procedure seems to be much more complicated than on linux.
There is mingw and cygwin. But if you compile it with cygwin you will always need cygwin.dll, so I do it with mingw.
You shouldn't have to change much in the linux makefile to compile with mingw.
LG Georg
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
and thats the errormessages...
D:\pd\iemlib\iemmatrix\src>mingw32-make -f d:\pd\iemlib\iemmatrix\src\makefile.pd-mingw g++ -shared iemmatrix.c mtx_binops.c mtx_check.c mtx_cholesky.c mtx_col.c mtx_diag.c mtx_diegg.c mtx_distance2.c mtx_eg g.c mtx_element.c mtx_eye.c mtx_inverse.c mtx_matrix.c mtx_mean.c mtx_ones.c mtx_pivot.c mtx_print.c mtx_rand.c mtx_resi ze.c mtx_roll.c mtx_row.c mtx_scroll.c mtx_size.c mtx_tilde.c mtx_trace.c mtx_transpose.c mtx_zeros.c d:/pd/bin/pd.dll d :/pd/bin/pthreadVC.dll -o D:/pd/iemlib/iemmatrix/iemmatrix.dll mtx_binops.c: In function
void mtx_bin_matrix2(t_mtx_binmtx*, t_symbol*, int, t_atom*)': mtx_binops.c:31: warning: converting to
int' fromt_float' mtx_binops.c:32: warning: converting to
int' fromt_float' mtx_binops.c:39: error: invalid conversion from
void*' to `t_atom*' mtx_binops.c: In functionvoid mtx_addscalar_matrix(t_mtx_binscalar*, t_symbol*, int, t_atom*)': mtx_binops.c:74: warning: converting to
int' fromt_float' mtx_binops.c:74: warning: converting to
int' fromt_float' mtx_binops.c: In function
void mtx_add_matrix(t_mtx_binmtx*, t_symbol*, int, t_atom*)': mtx_binops.c:108: warning: converting toint' from
t_float' mtx_binops.c:109: warning: converting toint' from
t_float' mtx_binops.c: In function `void mtx_add_float(t_mtx_binmtx*, t_float)': mtx_binops.c:148: warning: converting toint' from
t_float' mtx_binops.c:149: warning: converting toint' from
t_float' mtx_binops.c: In functionvoid mtx_add_setup()': mtx_binops.c:192: error: invalid conversion from
int' tot_atomtype' mtx_binops.c:192: error: initializing argument 6 of
_class* class_new(t_symbol*, void*(*)(), void (*)(), size_t, int, t_atomtype, ...)'
Hi Marius, you are obviously using the C++ compiler g++ for plain C sources. In the makefile try replacing $(CXX) with $(CC). This should at least reduce the number of error messages.
In case you have flext from cvs installed, you can also try to use its build system to build iemmatrix. Just create a file package.txt, with NAME=iemmatrix SRCS=iemmatrix.c mtx_binops.c ....... (all source files)
and then run "pathtoflext\build.bat pd msvc". This should also work with MinGW.
best greetings, Thomas
From: "Thomas Grill"
Hi Marius, you are obviously using the C++ compiler g++ for plain C sources. In the makefile try replacing $(CXX) with $(CC). This should at least reduce the number of error messages.
ah! that was a good hint. What I finally did was: edit the config-pd-mingw.txt and added the line CC=d:/mingw/bin/gcc
there is still an error (see below), but the iemmatrix.dll seems to be built correctly and is working in Pd. thank you.
[...] Info: resolving _s_ by linking to __imp__s_ (auto-import) Info: resolving _s_signal by linking to __imp__s_signal (auto-import) strip --strip-unneeded D:/pd/iemlib/iemmatrix/iemmatrix.dll chmod 755 D:/pd/iemlib/iemmatrix/iemmatrix.dll process_begin: CreateProcess((null), chmod 755 D:/pd/iemlib/iemmatrix/iemmatrix.dll, ...) failed. make (e=2): Das System kann die angegebene Datei nicht finden. mingw32-make: *** [D:/pd/iemlib/iemmatrix/iemmatrix.dll] Error 2
In case you have flext from cvs installed, you can also try to use its build system to build iemmatrix. Just create a file package.txt, with NAME=iemmatrix SRCS=iemmatrix.c mtx_binops.c ....... (all source files)
and then run "pathtoflext\build.bat pd msvc". This should also work with MinGW.
next time...
marius.
Marius Schebella wrote:
hi, Tried (both borland and mingw), but no luck, tried to patch the original makefile, and also comparing with thomas grills exemplary makefiles. but
ok, i have put a precompiled version online at ftp://ftp.iem.at/pd/Externals/IEMMATRIX
notes:
not included)
hey cross compiling for windows on linux is fun!
mfg.asdr. IOhannes
Hi, thank you, IOhannes, I finally managed the compiling at about the same time you posted the dll. marius.
----- Original Message ----- From: "IOhannes m zmoelnig" zmoelnig@iem.at To: "Marius Schebella" marius.schebella@chello.at Cc: pd-list@iem.at Sent: Tuesday, May 10, 2005 10:58 AM Subject: Re: [PD] compiling iemmatrix on windows
Marius Schebella wrote:
hi, Tried (both borland and mingw), but no luck, tried to patch the original makefile, and also comparing with thomas grills exemplary makefiles. but
ok, i have put a precompiled version online at ftp://ftp.iem.at/pd/Externals/IEMMATRIX
notes:
- this is NO release (but feel free to post bugs)
- this is only the dll (iemmmatrix also has some abstractions which are
not included)
- this is has been cross-compiled with mingw on a debian/gnu system
hey cross compiling for windows on linux is fun!
mfg.asdr. IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list