Results 1 to 6 of 6

Thread: 'NDIlib_recv_create_t' is deprecated

  1. #1
    Registered User
    Join Date
    Mar 2019
    Location
    Canada
    Posts
    3

    'NDIlib_recv_create_t' is deprecated

    When I compile code which includes calls to the NDI SDK I get numerous warnings of the type:

    Code:
    'NDIlib_recv_create_t' is deprecated
    For example, this minimal program

    Code:
    #include <iostream>
    #include <Processing.NDI.Lib.h>
    
    int main()
    {
        if (!NDIlib_initialize())
            throw std::runtime_error("Cannot initialize NDI");
    
        NDIlib_find_instance_t pNDI_find = NDIlib_find_create_v2();
        if (!pNDI_find)
            throw std::runtime_error("Cannot initialize NDI");
    
        return 0;
    }
    when compiled like this:

    Code:
    g++.exe -Wall -fexceptions -O2 -I"C:\Program Files\NewTek\NewTek NDI 3.8 SDK\Include" -c C:\Users\James\code\VisControl\ndi\test\main.cpp -o obj\Release\main.o
    ( g++ v8.3 running under MSYS2 )

    produces a long string of

    Code:
    In file included from C:\Program Files\NewTek\NewTek NDI 3.8 SDK\Include/Processing.NDI.Lib.h:128,
                     from C:\Users\James\code\VisControl\ndi\test\main.cpp:2:
    C:\Program Files\NewTek\NewTek NDI 3.8 SDK\Include/Processing.NDI.deprecated.h:137:123: warning: 'NDIlib_recv_create_t' is deprecated [-Wdeprecated-declarations]
     NDIlib_recv_instance_t NDIlib_recv_create_v2(const NDIlib_recv_create_t* p_create_settings NDILIB_CPP_DEFAULT_VALUE(NULL) );
                                                                                                                               ^
    C:\Program Files\NewTek\NewTek NDI 3.8 SDK\Include/Processing.NDI.deprecated.h:142:120: warning: 'NDIlib_recv_create_t' is deprecated [-Wdeprecated-declarations]
     NDIlib_recv_instance_t NDIlib_recv_create2(const NDIlib_recv_create_t* p_create_settings NDILIB_CPP_DEFAULT_VALUE(NULL));
                                                                                                                            ^
    C:\Program Files\NewTek\NewTek NDI 3.8 SDK\Include/Processing.NDI.deprecated.h:148:88: warning: 'NDIlib_recv_create_t' is deprecated [-Wdeprecated-declarations]
     NDIlib_recv_instance_t NDIlib_recv_create(const NDIlib_recv_create_t* p_create_settings);
    
    ....
    The resulting program runs OK, but it is hard to spot genuine problems in the build log because they are drowned out by all these deprecated messages. How do I get rid of them?

  2. #2
    Registered User
    Join Date
    Mar 2019
    Location
    Canada
    Posts
    3
    Problem went away when I added compiler option:

    -Wno-deprecated-declarations

  3. #3
    Software Engineer
    Join Date
    Jul 2006
    Location
    San Antonio, TX
    Posts
    12
    Just keep in mind that it may be worthwhile to update to the newer API.
    Brian

  4. #4
    Registered User
    Join Date
    Mar 2019
    Location
    Canada
    Posts
    3
    I am not using the deprecated functions. Look at the code I posted, I am using NDIlib_find_create_v2(). Despite this, I still get the deprecated messages for the old functions that I am not using.

  5. #5
    Registered User roddyp's Avatar
    Join Date
    Sep 2017
    Location
    UK
    Posts
    26
    Quote Originally Posted by ravenspoint View Post
    I am not using the deprecated functions.
    It looks rather like a compiler bug when a deprecated function uses a deprecated class. It looks like you're using mingw, but what version?

  6. #6
    Registered User
    Join Date
    Jul 2019
    Location
    Canada
    Posts
    1
    Related, but can we get a flag (something like NDILIB_NO_DEPRECATED) that outright doesn't expose the deprecated functions? `-Wno-deprecated-declarations` turns off warnings for deprecation, but still makes them available. I ended up manually editing the headers to shut-up the warnings, but next time I upgrade they'll be back. Thanks!

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
  •