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. How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?
Forum Updated to NodeBB v4.3 + New Features

How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?

Scheduled Pinned Locked Moved Solved General and Desktop
26 Posts 7 Posters 6.2k Views 3 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #10

    Can your show your .pro file content ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    W 1 Reply Last reply
    0
    • SGaistS SGaist

      Can your show your .pro file content ?

      W Offline
      W Offline
      Warrior
      wrote on last edited by Warrior
      #11

      @SGaist Sure. There you go:

      QT += gui
      QT += xml
      
      CONFIG += c++11 console
      CONFIG -= app_bundle
      
      # The following define makes your compiler emit warnings if you use
      # any feature of Qt which as been marked deprecated (the exact warnings
      # depend on your compiler). Please consult the documentation of the
      # deprecated API in order to know how to port your code away from it.
      DEFINES += QT_DEPRECATED_WARNINGS
      
      # You can also make your code fail to compile if you use deprecated APIs.
      # In order to do so, uncomment the following line.
      # You can also select to disable deprecated APIs only up to a certain version of Qt.
      DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      QMAKE_CXXFLAGS += -msse2
      QMAKE_CXXFLAGS += -fopenmp
      LIBS += -fopenmp
      LIBS += -L"/home/Warrior/Desktop/pathtracer/oidn/build/" -lOpenImageDenoise
      
      
      
      SOURCES += main.cpp \
          pathtracer.cpp \
          scene/scene.cpp \
          BVH/BBox.cpp \
          BVH/BVH.cpp \
          scene/camera.cpp \
          scene/basiccamera.cpp \
          util/CS123XmlSceneParser.cpp \
          scene/shape/mesh.cpp \
          scene/shape/triangle.cpp
      
      HEADERS += \
          pathtracer.h \
          scene/scene.h \
          BVH/BBox.h \
          BVH/BVH.h \
          BVH/IntersectionInfo.h \
          BVH/Log.h \
          BVH/Object.h \
          BVH/Ray.h \
          BVH/Stopwatch.h \
          scene/camera.h \
          scene/basiccamera.h \
          util/CS123Common.h \
          util/CS123ISceneParser.h \
          util/CS123SceneData.h \
          util/CS123XmlSceneParser.h \
          scene/shape/Sphere.h \
          scene/shape/mesh.h \
          scene/shape/triangle.h \
          util/tiny_obj_loader.h \
          BVH/vector3.h \
          oidn/include/OpenImageDenoise/oidn.hpp \
          oidn/include/OpenImageDenoise/config.h \
          oidn/build/mkl-dnn/include/dnnl_config.h \
      
      INCLUDEPATH += "Eigen/"
      INCLUDEPATH += "oidn/include/OpenImageDenoise"
      INCLUDEPATH += "oidn/build/mkl-dnn/include/"
      INCLUDEPATH += "/oidn/build/"
      
      DISTFILES += \
          README.txt
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #12

        That is looking good...
        Did you do a full rebuild after modifying these paths ?
        Also, did you check that all the symlinks of libOpenImageDenoise are valid and pointing to valid files ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        W 1 Reply Last reply
        2
        • SGaistS SGaist

          That is looking good...
          Did you do a full rebuild after modifying these paths ?
          Also, did you check that all the symlinks of libOpenImageDenoise are valid and pointing to valid files ?

          W Offline
          W Offline
          Warrior
          wrote on last edited by
          #13

          @SGaist Yes I did do a clean compilation but got the same error. I did not however check the symlinks you mentioned. How can I do that?

          jsulmJ 1 Reply Last reply
          0
          • W Warrior

            @SGaist Yes I did do a clean compilation but got the same error. I did not however check the symlinks you mentioned. How can I do that?

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

            @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

            How can I do that?

            ls -lh /home/Warrior/Desktop/pathtracer/oidn/build/
            

            What is the output of this command?

            W 1 Reply Last reply
            1
            • jsulmJ jsulm

              @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

              How can I do that?

              ls -lh /home/Warrior/Desktop/pathtracer/oidn/build/
              

              What is the output of this command?

              W Offline
              W Offline
              Warrior
              wrote on last edited by
              #15

              @jsulm Apparently the files don't show up. Could it be because I cloned and built oidn in another directory first and then moved everything to the path where my program is? or is there a way to fix the symlink issue?

              ls -lh /home/Warrior/Desktop/pathtracer/oidn/build/
              total 160K
              drwxrwxr-x 4 Warrior Warrior 4.0K Feb  4 00:09 apps
              -rw-rw-r-- 1 Warrior Warrior  19K Feb  4 00:09 CMakeCache.txt
              drwxrwxr-x 7 Warrior Warrior 4.0K Feb  4 00:09 CMakeFiles
              -rw-rw-r-- 1 Warrior Warrior 6.5K Feb  4 00:09 cmake_install.cmake
              drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:09 common
              -rw-r--r-- 1 Warrior Warrior 3.6K Feb  4 00:09 CPackConfig.cmake
              -rw-r--r-- 1 Warrior Warrior 4.0K Feb  4 00:09 CPackSourceConfig.cmake
              -rw-rw-r-- 1 Warrior Warrior 103K Feb  4 00:09 Makefile
              drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:08 mkl-dnn
              -rw-r--r-- 1 Warrior Warrior 1.6K Feb  4 00:09 OpenImageDenoiseConfigVersion.cmake
              
              jsulmJ 2 Replies Last reply
              0
              • W Warrior

                @jsulm Apparently the files don't show up. Could it be because I cloned and built oidn in another directory first and then moved everything to the path where my program is? or is there a way to fix the symlink issue?

                ls -lh /home/Warrior/Desktop/pathtracer/oidn/build/
                total 160K
                drwxrwxr-x 4 Warrior Warrior 4.0K Feb  4 00:09 apps
                -rw-rw-r-- 1 Warrior Warrior  19K Feb  4 00:09 CMakeCache.txt
                drwxrwxr-x 7 Warrior Warrior 4.0K Feb  4 00:09 CMakeFiles
                -rw-rw-r-- 1 Warrior Warrior 6.5K Feb  4 00:09 cmake_install.cmake
                drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:09 common
                -rw-r--r-- 1 Warrior Warrior 3.6K Feb  4 00:09 CPackConfig.cmake
                -rw-r--r-- 1 Warrior Warrior 4.0K Feb  4 00:09 CPackSourceConfig.cmake
                -rw-rw-r-- 1 Warrior Warrior 103K Feb  4 00:09 Makefile
                drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:08 mkl-dnn
                -rw-r--r-- 1 Warrior Warrior 1.6K Feb  4 00:09 OpenImageDenoiseConfigVersion.cmake
                
                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #16
                This post is deleted!
                1 Reply Last reply
                0
                • W Warrior

                  @jsulm Apparently the files don't show up. Could it be because I cloned and built oidn in another directory first and then moved everything to the path where my program is? or is there a way to fix the symlink issue?

                  ls -lh /home/Warrior/Desktop/pathtracer/oidn/build/
                  total 160K
                  drwxrwxr-x 4 Warrior Warrior 4.0K Feb  4 00:09 apps
                  -rw-rw-r-- 1 Warrior Warrior  19K Feb  4 00:09 CMakeCache.txt
                  drwxrwxr-x 7 Warrior Warrior 4.0K Feb  4 00:09 CMakeFiles
                  -rw-rw-r-- 1 Warrior Warrior 6.5K Feb  4 00:09 cmake_install.cmake
                  drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:09 common
                  -rw-r--r-- 1 Warrior Warrior 3.6K Feb  4 00:09 CPackConfig.cmake
                  -rw-r--r-- 1 Warrior Warrior 4.0K Feb  4 00:09 CPackSourceConfig.cmake
                  -rw-rw-r-- 1 Warrior Warrior 103K Feb  4 00:09 Makefile
                  drwxrwxr-x 3 Warrior Warrior 4.0K Feb  4 00:08 mkl-dnn
                  -rw-r--r-- 1 Warrior Warrior 1.6K Feb  4 00:09 OpenImageDenoiseConfigVersion.cmake
                  
                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #17

                  @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

                  or is there a way to fix the symlink issue?

                  Your current issue is not related to sym-links. Your problem is that the folder you pass via -L does NOT contain the libs. Either put them back to this folder or pass the folder containing the libs via -L.

                  W 1 Reply Last reply
                  2
                  • jsulmJ jsulm

                    @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

                    or is there a way to fix the symlink issue?

                    Your current issue is not related to sym-links. Your problem is that the folder you pass via -L does NOT contain the libs. Either put them back to this folder or pass the folder containing the libs via -L.

                    W Offline
                    W Offline
                    Warrior
                    wrote on last edited by
                    #18

                    @jsulm Well the folder definitely does contain the libs:

                    05cb4e99-ce84-4bd3-96e2-80ec58d3d1c4-image.png

                    JonBJ 1 Reply Last reply
                    0
                    • W Warrior

                      @jsulm Well the folder definitely does contain the libs:

                      05cb4e99-ce84-4bd3-96e2-80ec58d3d1c4-image.png

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

                      @Warrior
                      Well you can see for yourself that the listing from ls does not match the files/directories in your screenshot.

                      My guess is that screenshot does not come from navigating to the same directory. (A screenshot from file manager without proof of what directory is showing is not much use.) So you need to look closely to sort this out....

                      W 1 Reply Last reply
                      3
                      • JonBJ JonB

                        @Warrior
                        Well you can see for yourself that the listing from ls does not match the files/directories in your screenshot.

                        My guess is that screenshot does not come from navigating to the same directory. (A screenshot from file manager without proof of what directory is showing is not much use.) So you need to look closely to sort this out....

                        W Offline
                        W Offline
                        Warrior
                        wrote on last edited by
                        #20

                        @JonB I totally understand the suspicious discrepancy between the screen shot and the directory listing but I am not trying to be funny and take people's time. They're both from the same path. I think I need to clone the oidn repo in the same directory where my code is and build it there. That can hopefully solve the problem.

                        JonBJ 1 Reply Last reply
                        0
                        • Christian EhrlicherC Offline
                          Christian EhrlicherC Offline
                          Christian Ehrlicher
                          Lifetime Qt Champion
                          wrote on last edited by
                          #21

                          @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

                          They're both from the same path.

                          No matter what you tell us - no they're not from the same path. Make sure you use the right one and think about e.g. case sensitivity.

                          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                          Visit the Qt Academy at https://academy.qt.io/catalog

                          1 Reply Last reply
                          2
                          • W Warrior

                            @JonB I totally understand the suspicious discrepancy between the screen shot and the directory listing but I am not trying to be funny and take people's time. They're both from the same path. I think I need to clone the oidn repo in the same directory where my code is and build it there. That can hopefully solve the problem.

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

                            @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

                            They're both from the same path.

                            Can you show us what the file manager says the path it is showing is?

                            1 Reply Last reply
                            0
                            • W Offline
                              W Offline
                              Warrior
                              wrote on last edited by Warrior
                              #23

                              @SGaist @JonB @jsulm @Christian-Ehrlicher Thank you all. I finally managed to fix the issue. I cloned the repo in the same directory where my code is and built it there. Here's what ls -lh /home/Warrior/Desktop/pathtracer/oidn/build shows me now and I can successfully build my code and run it. I cannot believe that things didn't work the first time and symlinks were incorrect/missing:

                              total 51M
                              drwxrwxr-x 4 Warrior Warrior 4.0K Feb  9 10:14 apps
                              -rw-rw-r-- 1 Warrior Warrior  19K Feb  9 10:14 CMakeCache.txt
                              drwxrwxr-x 7 Warrior Warrior 4.0K Feb  9 10:19 CMakeFiles
                              -rw-rw-r-- 1 Warrior Warrior 5.6K Feb  9 10:14 cmake_install.cmake
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx2.h
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx512skx.h
                              -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 color_ispc.h
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_sse4.h
                              drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 common
                              -rw-r--r-- 1 Warrior Warrior 3.3K Feb  9 10:14 CPackConfig.cmake
                              -rw-r--r-- 1 Warrior Warrior 3.7K Feb  9 10:14 CPackSourceConfig.cmake
                              -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx2.h
                              -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx512skx.h
                              -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 input_reorder_ispc.h
                              -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_sse4.h
                              -rw-rw-r-- 1 Warrior Warrior  41K Feb  9 10:14 libcommon.a
                              -rw-rw-r-- 1 Warrior Warrior  16M Feb  9 10:17 libdnnl.a
                              lrwxrwxrwx 1 Warrior Warrior   24 Feb  9 10:19 libOpenImageDenoise.so -> libOpenImageDenoise.so.0
                              lrwxrwxrwx 1 Warrior Warrior   28 Feb  9 10:19 libOpenImageDenoise.so.0 -> libOpenImageDenoise.so.1.3.0
                              -rwxrwxr-x 1 Warrior Warrior  34M Feb  9 10:19 libOpenImageDenoise.so.1.3.0
                              -rw-rw-r-- 1 Warrior Warrior  37K Feb  9 10:19 libutils.a
                              drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 local__core
                              -rw-rw-r-- 1 Warrior Warrior 104K Feb  9 10:14 Makefile
                              drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 mkl-dnn
                              -rwxrwxr-x 1 Warrior Warrior 181K Feb  9 10:19 oidnBenchmark
                              -rwxrwxr-x 1 Warrior Warrior  59K Feb  9 10:19 oidnDenoise
                              -rwxrwxr-x 1 Warrior Warrior 882K Feb  9 10:19 oidnTest
                              -rw-r--r-- 1 Warrior Warrior 1.6K Feb  9 10:14 OpenImageDenoiseConfigVersion.cmake
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx2.h
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx512skx.h
                              -rw-rw-r-- 1 Warrior Warrior 1.9K Feb  9 10:17 output_copy_ispc.h
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_sse4.h
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx2.h
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx512skx.h
                              -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 output_reorder_ispc.h
                              -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_sse4.h
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx2.h
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx512skx.h
                              -rw-rw-r-- 1 Warrior Warrior 1.8K Feb  9 10:17 upsample_ispc.h
                              -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_sse4.h
                              drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 weights
                              
                              jsulmJ Pablo J. RoginaP 2 Replies Last reply
                              0
                              • W Warrior

                                @SGaist @JonB @jsulm @Christian-Ehrlicher Thank you all. I finally managed to fix the issue. I cloned the repo in the same directory where my code is and built it there. Here's what ls -lh /home/Warrior/Desktop/pathtracer/oidn/build shows me now and I can successfully build my code and run it. I cannot believe that things didn't work the first time and symlinks were incorrect/missing:

                                total 51M
                                drwxrwxr-x 4 Warrior Warrior 4.0K Feb  9 10:14 apps
                                -rw-rw-r-- 1 Warrior Warrior  19K Feb  9 10:14 CMakeCache.txt
                                drwxrwxr-x 7 Warrior Warrior 4.0K Feb  9 10:19 CMakeFiles
                                -rw-rw-r-- 1 Warrior Warrior 5.6K Feb  9 10:14 cmake_install.cmake
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx2.h
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx512skx.h
                                -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 color_ispc.h
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_sse4.h
                                drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 common
                                -rw-r--r-- 1 Warrior Warrior 3.3K Feb  9 10:14 CPackConfig.cmake
                                -rw-r--r-- 1 Warrior Warrior 3.7K Feb  9 10:14 CPackSourceConfig.cmake
                                -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx2.h
                                -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx512skx.h
                                -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 input_reorder_ispc.h
                                -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_sse4.h
                                -rw-rw-r-- 1 Warrior Warrior  41K Feb  9 10:14 libcommon.a
                                -rw-rw-r-- 1 Warrior Warrior  16M Feb  9 10:17 libdnnl.a
                                lrwxrwxrwx 1 Warrior Warrior   24 Feb  9 10:19 libOpenImageDenoise.so -> libOpenImageDenoise.so.0
                                lrwxrwxrwx 1 Warrior Warrior   28 Feb  9 10:19 libOpenImageDenoise.so.0 -> libOpenImageDenoise.so.1.3.0
                                -rwxrwxr-x 1 Warrior Warrior  34M Feb  9 10:19 libOpenImageDenoise.so.1.3.0
                                -rw-rw-r-- 1 Warrior Warrior  37K Feb  9 10:19 libutils.a
                                drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 local__core
                                -rw-rw-r-- 1 Warrior Warrior 104K Feb  9 10:14 Makefile
                                drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 mkl-dnn
                                -rwxrwxr-x 1 Warrior Warrior 181K Feb  9 10:19 oidnBenchmark
                                -rwxrwxr-x 1 Warrior Warrior  59K Feb  9 10:19 oidnDenoise
                                -rwxrwxr-x 1 Warrior Warrior 882K Feb  9 10:19 oidnTest
                                -rw-r--r-- 1 Warrior Warrior 1.6K Feb  9 10:14 OpenImageDenoiseConfigVersion.cmake
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx2.h
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx512skx.h
                                -rw-rw-r-- 1 Warrior Warrior 1.9K Feb  9 10:17 output_copy_ispc.h
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_sse4.h
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx2.h
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx512skx.h
                                -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 output_reorder_ispc.h
                                -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_sse4.h
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx2.h
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx512skx.h
                                -rw-rw-r-- 1 Warrior Warrior 1.8K Feb  9 10:17 upsample_ispc.h
                                -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_sse4.h
                                drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 weights
                                
                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #24

                                @Warrior Just as a tip: do not build inside source code tree. Create a build folder and build from there (out of source build):

                                mkdir build
                                cd build
                                cmake ../SOURCE_CODE_FOLDER
                                make
                                make install
                                
                                1 Reply Last reply
                                4
                                • W Warrior

                                  @SGaist @JonB @jsulm @Christian-Ehrlicher Thank you all. I finally managed to fix the issue. I cloned the repo in the same directory where my code is and built it there. Here's what ls -lh /home/Warrior/Desktop/pathtracer/oidn/build shows me now and I can successfully build my code and run it. I cannot believe that things didn't work the first time and symlinks were incorrect/missing:

                                  total 51M
                                  drwxrwxr-x 4 Warrior Warrior 4.0K Feb  9 10:14 apps
                                  -rw-rw-r-- 1 Warrior Warrior  19K Feb  9 10:14 CMakeCache.txt
                                  drwxrwxr-x 7 Warrior Warrior 4.0K Feb  9 10:19 CMakeFiles
                                  -rw-rw-r-- 1 Warrior Warrior 5.6K Feb  9 10:14 cmake_install.cmake
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx2.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_avx512skx.h
                                  -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 color_ispc.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 color_ispc_sse4.h
                                  drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 common
                                  -rw-r--r-- 1 Warrior Warrior 3.3K Feb  9 10:14 CPackConfig.cmake
                                  -rw-r--r-- 1 Warrior Warrior 3.7K Feb  9 10:14 CPackSourceConfig.cmake
                                  -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx2.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_avx512skx.h
                                  -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 input_reorder_ispc.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.6K Feb  9 10:17 input_reorder_ispc_sse4.h
                                  -rw-rw-r-- 1 Warrior Warrior  41K Feb  9 10:14 libcommon.a
                                  -rw-rw-r-- 1 Warrior Warrior  16M Feb  9 10:17 libdnnl.a
                                  lrwxrwxrwx 1 Warrior Warrior   24 Feb  9 10:19 libOpenImageDenoise.so -> libOpenImageDenoise.so.0
                                  lrwxrwxrwx 1 Warrior Warrior   28 Feb  9 10:19 libOpenImageDenoise.so.0 -> libOpenImageDenoise.so.1.3.0
                                  -rwxrwxr-x 1 Warrior Warrior  34M Feb  9 10:19 libOpenImageDenoise.so.1.3.0
                                  -rw-rw-r-- 1 Warrior Warrior  37K Feb  9 10:19 libutils.a
                                  drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 local__core
                                  -rw-rw-r-- 1 Warrior Warrior 104K Feb  9 10:14 Makefile
                                  drwxrwxr-x 3 Warrior Warrior 4.0K Feb  9 10:14 mkl-dnn
                                  -rwxrwxr-x 1 Warrior Warrior 181K Feb  9 10:19 oidnBenchmark
                                  -rwxrwxr-x 1 Warrior Warrior  59K Feb  9 10:19 oidnDenoise
                                  -rwxrwxr-x 1 Warrior Warrior 882K Feb  9 10:19 oidnTest
                                  -rw-r--r-- 1 Warrior Warrior 1.6K Feb  9 10:14 OpenImageDenoiseConfigVersion.cmake
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx2.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_avx512skx.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.9K Feb  9 10:17 output_copy_ispc.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 output_copy_ispc_sse4.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx2.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_avx512skx.h
                                  -rw-rw-r-- 1 Warrior Warrior 3.1K Feb  9 10:17 output_reorder_ispc.h
                                  -rw-rw-r-- 1 Warrior Warrior 2.5K Feb  9 10:17 output_reorder_ispc_sse4.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx2.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_avx512skx.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.8K Feb  9 10:17 upsample_ispc.h
                                  -rw-rw-r-- 1 Warrior Warrior 1.5K Feb  9 10:17 upsample_ispc_sse4.h
                                  drwxrwxr-x 2 Warrior Warrior 4.0K Feb  9 10:17 weights
                                  
                                  Pablo J. RoginaP Offline
                                  Pablo J. RoginaP Offline
                                  Pablo J. Rogina
                                  wrote on last edited by
                                  #25

                                  @Warrior said in How to link an external library in Qt Creator when LIBS += -L“…” and -l don't seem to work?:

                                  I finally managed to fix the issue

                                  so please don't forget to mark your post as solved!

                                  Upvote the answer(s) that helped you solve the issue
                                  Use "Topic Tools" button to mark your post as Solved
                                  Add screenshots via postimage.org
                                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                  1 Reply Last reply
                                  2
                                  • coffeesmokeC Offline
                                    coffeesmokeC Offline
                                    coffeesmoke
                                    wrote on last edited by coffeesmoke
                                    #26

                                    QMAKE_LFLAGS += "-Wl,-rpath,\'/home/Warrior/Desktop/pathtracer/oidn/build\'"

                                    1 Reply Last reply
                                    0

                                    • Login

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