Apologies for spam; we've changed our policy by requiring approval for accounts, and deleted all existing spam and user - thanks for your help flagging content. We continue to test our forums and Vanilla software, aiming for release early in 2013. If you need to give us feedback outside the forum, contact us via http://createdigitalmusic.com/contact/ or on Facebook
_WIN32_WINNT not defined
  • Hello,
    I've downloaded the latest version of ofxPd from Github repository (danomatika-ofxPd-007-47-g92869c8). When I compile the ofxPd codeblocks example project for Windows I get this error: "undefined reference to `SetDllDirectory'". The declaration of the SetDllDirectory function is in the winbase.h header file (in pure-data/src):

    #if (_WIN32_WINNT >= 0x0502)
    #define SetDllDirectory SetDllDirectoryW
    #endif

    and in ofConstants.h (openFrameworks/utils) there is:

    #ifndef _WIN32_WINNT
    # define _WIN32_WINNT 0x400
    #endif

    so it seems like _WIN32_WINNT is not defined.
    I've tested the project on Windows 7 and XP.

    My solution is to insert "_WIN32_WINNT=0x0502" in the "#define" section of Codeblocks project build options.
    Does anyone have the same problem?Is there another way to fix it?

    Thank you!
  • Can you file this as an issue to ofxPd on Github? Its much easier to keep track of bugs there.
  • Yeah .... I've done that a month ago....but no comment yet
  • Has anyone else noticed this on Windows? I haven't on my Win 7 machine.
  • These macros are defined in mingw's windef.h:

    #ifndef WINVER
    #define WINVER 0x0400
    #endif
    #ifndef _WIN32_WINNT
    #define _WIN32_WINNT WINVER
    #endif

    Sounds like you're missing "-DWINVER=0x502" in the compiler flags, or you haven't included windef.h before checking and setting the _WIN32_WINNT definition.
  • Ok cool. A simple fix then. I can update the example project and add a note to the readme. Also, feel free to make a pull request on Github if you have time to do it. I probably won't get to it for a few weeks or so.