Mercurial > hg > vampy
changeset 19:a54850da8229
* Windows build (with mingw32 atm)
author | cannam |
---|---|
date | Mon, 13 Jul 2009 12:23:51 +0000 |
parents | e9cf443b18f5 |
children | 812fbde7eca5 |
files | Makefile.cc-mingw32 pyvamp-main.cpp |
diffstat | 2 files changed, 21 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.cc-mingw32 Mon Jul 13 12:23:51 2009 +0000 @@ -0,0 +1,10 @@ + +CXX := i586-mingw32msvc-g++ +CXXFLAGS := -I../include -O2 -Wall -I../../Python26/include + +vampy.dll: PyPlugin.o PyPlugScanner.o pyvamp-main.o Mutex.o + i586-mingw32msvc-g++ -shared $^ -o $@ -L../lib -L../../Python26/libs -Wl,-Bstatic -lvamp-sdk -Wl,-Bdynamic -lpython26 -Wl,--version-script=vamp-plugin.map + +clean: + rm *.o +
--- a/pyvamp-main.cpp Fri Jul 10 15:14:24 2009 +0000 +++ b/pyvamp-main.cpp Mon Jul 13 12:23:51 2009 +0000 @@ -106,18 +106,21 @@ static bool tryPreload(string name) { -// cerr << "Trying to load Python interpreter library \"" << name << "\"..."; + cerr << "Trying to load Python interpreter library \"" << name << "\"..."; +#ifdef _WIN32 + void *lib = LoadLibrary(name.c_str()); + if (!lib) { + cerr << " failed" << endl; + return false; + } +#else void *lib = dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL); if (!lib) { -// char *err = dlerror(); -// if (err && err[0]) { -// cerr << " failed (" << err << ")" << endl; -// } else { -// cerr << " failed" << endl; -// } + cerr << " failed" << endl; return false; } -// cerr << " succeeded" << endl; +#endif + cerr << " succeeded" << endl; return true; }