Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Eigen libarary linking error
Forum Updated to NodeBB v4.3 + New Features

Eigen libarary linking error

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 3 Posters 753 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eswaramrth03
    wrote on last edited by
    #1

    I am developing visualizer application based on this libBSDF. In that i am using .pro file instead of cmake. In that i am using eigen library for computation. I included the library's as follows

    12782e87-6a52-4b22-a389-5424930541f1-image.png

    I am getting the following linking error

    eigen.JPG

    Please do a needful as soon as possible.

    jsulmJ 1 Reply Last reply
    0
    • E eswaramrth03

      I am developing visualizer application based on this libBSDF. In that i am using .pro file instead of cmake. In that i am using eigen library for computation. I included the library's as follows

      12782e87-6a52-4b22-a389-5424930541f1-image.png

      I am getting the following linking error

      eigen.JPG

      Please do a needful as soon as possible.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @eswaramrth03 said in Eigen libarary linking error:

      Please do a needful as soon as possible.

      This is user forum, be patient.
      Please post text, not screen-shots.

      Back to your issue: please take a closer look at how you're adding libBSDF. Do you think you're doing it correctly? When using -l parameter you have to remove lib prefix, so it should be -lbsdf.
      Regarding Eigen: where do you set LIBS to tell the linker to link it?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply
      3
      • jsulmJ jsulm

        @eswaramrth03 said in Eigen libarary linking error:

        Please do a needful as soon as possible.

        This is user forum, be patient.
        Please post text, not screen-shots.

        Back to your issue: please take a closer look at how you're adding libBSDF. Do you think you're doing it correctly? When using -l parameter you have to remove lib prefix, so it should be -lbsdf.
        Regarding Eigen: where do you set LIBS to tell the linker to link it?

        E Offline
        E Offline
        eswaramrth03
        wrote on last edited by
        #3

        Hi @jsulm

        Eigen is a C++ template library, so I include the path in the .pro file

        INCLUDEPATH += $$PWD/deps/eigen-3.4/

        Is it correct?

        JonBJ jsulmJ 2 Replies Last reply
        0
        • E eswaramrth03

          Hi @jsulm

          Eigen is a C++ template library, so I include the path in the .pro file

          INCLUDEPATH += $$PWD/deps/eigen-3.4/

          Is it correct?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @eswaramrth03
          If that path is correct for its header files then yes. In any case, header file issues are dealt with at compile time. You show linker errors.

          @jsulm already said (both) your LIBS += lines are wrong for libbsdf, so what did you do about those?

          E 1 Reply Last reply
          0
          • E eswaramrth03

            Hi @jsulm

            Eigen is a C++ template library, so I include the path in the .pro file

            INCLUDEPATH += $$PWD/deps/eigen-3.4/

            Is it correct?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @eswaramrth03 said in Eigen libarary linking error:

            Eigen is a C++ template library

            All of it?
            You get a linker error, so looks like a lib is missing.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • JonBJ JonB

              @eswaramrth03
              If that path is correct for its header files then yes. In any case, header file issues are dealt with at compile time. You show linker errors.

              @jsulm already said (both) your LIBS += lines are wrong for libbsdf, so what did you do about those?

              E Offline
              E Offline
              eswaramrth03
              wrote on last edited by
              #6

              Hi @JonB The name of the library is libbsdf so only i included as -llibsdf in .pro file.

              jsulmJ 1 Reply Last reply
              0
              • E eswaramrth03

                Hi @JonB The name of the library is libbsdf so only i included as -llibsdf in .pro file.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @eswaramrth03 said in Eigen libarary linking error:

                so only i included as -llibsdf in .pro file

                Which is wrong as already mentioned in this thread.
                It has to be -lsdf (lib prefix and .so suffix needs to be removed from library file name when using -l).

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                E 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @eswaramrth03 said in Eigen libarary linking error:

                  so only i included as -llibsdf in .pro file

                  Which is wrong as already mentioned in this thread.
                  It has to be -lsdf (lib prefix and .so suffix needs to be removed from library file name when using -l).

                  E Offline
                  E Offline
                  eswaramrth03
                  wrote on last edited by
                  #8

                  @jsulm if i give similar way. I got the following error.

                  LINK : fatal error LNK1104: cannot open file 'bsdf.lib'

                  JonBJ 1 Reply Last reply
                  0
                  • E eswaramrth03

                    @jsulm if i give similar way. I got the following error.

                    LINK : fatal error LNK1104: cannot open file 'bsdf.lib'

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #9

                    @eswaramrth03
                    Just so we understand what is going. For the debug case you seem to have:

                    LIBS += -L$$PWD/deps/libbsdf/LibbsdfBin/debug/ -llibbsdf
                    

                    Temporarily try changing that to

                    LIBS += $$PWD/deps/libbsdf/LibbsdfBin/debug/libbsdf.lib
                    

                    (Adjust above for release instead of debug if compiling that way.)

                    I am hoping this is allowed and will clarify that for sure you are linking with that library file, and that it exists. Examine any error messages you might get.

                    Also confirm that everything --- your own code and whatever libraries you link with --- are all compiled with MSVC (not MinGW) and all with the same version of MSVC?

                    E 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @eswaramrth03
                      Just so we understand what is going. For the debug case you seem to have:

                      LIBS += -L$$PWD/deps/libbsdf/LibbsdfBin/debug/ -llibbsdf
                      

                      Temporarily try changing that to

                      LIBS += $$PWD/deps/libbsdf/LibbsdfBin/debug/libbsdf.lib
                      

                      (Adjust above for release instead of debug if compiling that way.)

                      I am hoping this is allowed and will clarify that for sure you are linking with that library file, and that it exists. Examine any error messages you might get.

                      Also confirm that everything --- your own code and whatever libraries you link with --- are all compiled with MSVC (not MinGW) and all with the same version of MSVC?

                      E Offline
                      E Offline
                      eswaramrth03
                      wrote on last edited by
                      #10

                      Hi @JonB
                      If i add the library like above you mentioned, the same eigen library error will came.

                      jsulmJ 1 Reply Last reply
                      0
                      • E eswaramrth03

                        Hi @JonB
                        If i add the library like above you mentioned, the same eigen library error will came.

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @eswaramrth03 Please post the whole build log as text

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • E eswaramrth03 deleted this topic on
                        • E eswaramrth03 restored this topic on

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved