I changed the defines to:
#ifdef _WIN32
#include <io.h>
#include <Windows.h>
#else
#include <unistd.h>
#include <dlfcn.h>
#endif
<Windows.h> was missing and <dlfcn.h> should be UNIX only. Then the code finally compiled on my Windows machine.
However, the Tcl error was still present (see screenshot).
Since I'm only using Pd >= 47, I skipped the DLL loading mechanism in check_compat() and just wrote:
iemgui_all_loadcolors_p = &iemgui_all_loadcolors
Now [mknob] is finally working again for me - thanks to Antoine and IOhannes!!!.
My question is now: Should I upload my Windows binaries to deken, with a notice that it only works for Pd >= 47
OR shall we wait for a solution which works for both old and new versions of Pd?
Christof
> Gesendet: Sonntag, 02. Oktober 2016 um 21:12 Uhr
> Von: "Christof Ressi" <christof.ressi@gmx.at>
> An: Pd-List <pd-list@lists.iem.at>
> Betreff: [PD] knob (again)
>
> Hi list,
>
> are there any people who can help to make [mknob] (and [knob]) build on windows? Here's the issue:
> https://github.com/MetaluNet/moonlib/issues/4
>
> Is [mknob] at least working on OSX and linux?
>
> Right know I'm working on a new project and I need knob GUIs. I managed to hack something together with data structures, but I'd prefer to use good old [knob] or [mknob]. Knobs have been used in quite a lot of projects and it's shame that they won't work on recent versions of Pd right know. I can try myself to repair it (since we know the cause and possible solutions) but my C skills are not exactly amazing. Maybe we can join forces to repair these objects?
>
> Christof
>
>
>
>
> _______________________________________________
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>