LNK2019: unresolved external symbol "public: __cdecl cv::structured_light::SinusoidalPattern::Params::Params



  • Hi i want to create sinusoidal pattern using opencv in QT and currently use this opencv library structured_light while i write this line

    cv::structured_light::SinusoidalPattern::Params params

    it give error..


  • Moderators

    @Faisal_Ali

    As the error message already says, there is an unresolved symbol.
    Probably you have linked with a wrong or even no library.

    Apparently you are using a MS compiler and linker. Did the error occur first time after you the structure_light stuff?
    Could you link successfully with cv before?



  • @koahnig yes it occur first time.


  • Moderators

    @Faisal_Ali

    Is the problem limited to structured_light?

    Are you using other opencv stuff?



  • @koahnig other library work fine.


  • Lifetime Qt Champion

    Hi,

    Are you linking against the contribute module that contains structured_light ?



  • @SGaist yes...basically i pick this library from contribute module...because structure light library is not available in downloaded opencv..


  • Moderators

    @Faisal_Ali

    Is this additional feature part of your project?

    When the feature is still part of your project, then yiou need to compile and link it with your project, but that part is missing.

    Or did you compile it and try to link it to your application?

    When you have compiled it and made a separate library, you need to add the library for linking with the project.

    Are you using Qt creator?



  • @koahnig yes this is main feature of our project i picked up folder and file of structured light then paste into opencv folder...basically i am beginner


  • Moderators

    @Faisal_Ali

    Are you using Qt creator?



  • @koahnig yes i am using qt creator 5.7


  • Moderators

    @Faisal_Ali

    In Qt creator you have a project file with the extension .pro

    Check the entries in this file. There typically some entries like

    SOURCES += main.cpp\
           MainWindow.cpp \
           MyRadio.cpp \
           MyRadioLine.cpp \
           MyLine.cpp
    
    HEADERS  += MainWindow.h \
          MyRadio.h \
          MyRadioLine.h \
          MyLine.h
    
    FORMS    += MainWindow.ui
    
    

    Under SOURCES all files for compilation have to be listed.
    Under HEADERS all include files are listed.

    Most likely the source file with your source code of structured_light is missing.

    If so, the source file is not compiled and cannot be linked to your application.


Log in to reply