Results 1 to 9 of 9

Thread: Library compilation errors

  1. #1
    Registered User
    Join Date
    Oct 2019
    Location
    Paris
    Posts
    2

    Exclamation Library compilation errors

    Hi everyone,

    I am beginning to integrate NDI in my company's software and i get compilation errors in Processing.NDI.Lib.h

    l43 : expected unqualified-id before string constant

    Compiler used : g++.exe (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2

    Unfortunately this is this only compiler i can use

    Thank you for your help in advance

  2. #2
    Registered User roddyp's Avatar
    Join Date
    Sep 2017
    Location
    UK
    Posts
    47
    Do the SDK examples compile OK? If so, look at what you're including before the NDI headers - and have you missed a semicolon after a class...

    mingw should accept the __declspec(dllimport) directive in the header. I'm less sure about the __declspec(deprecated) one, though?

  3. #3
    Registered User
    Join Date
    Oct 2019
    Location
    Paris
    Posts
    2
    Effectively, if i comment __declspec(deprecated) it compiles well. Where can i make a proper bug report for the developers to see ? (might get lost here)

  4. #4
    'the write stuff' SBowie's Avatar
    Join Date
    Feb 2003
    Location
    The stars at night are big and bright
    Posts
    19,428
    The email address for communication related to the SDK is in its docs.
    --
    Regards, Steve
    Forum Moderator
    ("You've got to ask yourself one question ... 'Do I feel lucky?' Well, do ya, spammer?")

  5. #5
    Registered User roddyp's Avatar
    Join Date
    Sep 2017
    Location
    UK
    Posts
    47
    I actually hit exactly the same problem today using an older version of C++Builder.
    Quote Originally Posted by Ulysse View Post
    Effectively, if i comment __declspec(deprecated) it compiles well.
    Rather than commenting it out, just add this before you #include the NDI headers.

    Code:
    #define PROCESSINGNDILIB_DEPRECATED
    This means you won't get any compiler warnings if you use deprecated functions.
    Alternatively you could try this, which uses the hopefully correct deprecation syntax for MinGW.

    Code:
    #define PROCESSINGNDILIB_DEPRECATED __attribute__((deprecated))
    No warranty expressed or implied with the second, as I don't have MinGW to try it.
    Last edited by roddyp; 10-22-2019 at 10:16 AM.

  6. #6
    Software Engineer
    Join Date
    Jul 2006
    Location
    San Antonio, TX
    Posts
    13
    So you mean this doesn't mean MSVC only?

    Code:
    #ifdef _WIN32
    #define PROCESSINGNDILIB_DEPRECATED __declspec(deprecated)
    #endif
    We'll get that fixed... :-)
    Brian

  7. #7
    Registered User
    Join Date
    Nov 2019
    Location
    Canada
    Posts
    2
    Starting out with NDI. Was also getting this error in MINGW 5.3.0 32-bit and MINGW 7.3.0 (64-bit). Fixed by adding:

    #define PROCESSINGNDILIB_DEPRECATED

    I don't fully understand what's going on though...

  8. #8
    Registered User roddyp's Avatar
    Join Date
    Sep 2017
    Location
    UK
    Posts
    47
    Quote Originally Posted by rtavakko View Post
    I don't fully understand what's going on though...
    Different compilers use different syntax to mark functions as "deprecated" (i.e. to warn you against using them).

    The NDI header files try and detect which compiler you're using, an then apply the correct syntax with a #define, but unfortunately there's a confusion if you're using non-Microsoft compilers but are developing for Windows.

  9. #9
    Registered User
    Join Date
    Nov 2019
    Location
    Canada
    Posts
    2
    Thank you for clarifying that, it makes sense.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •