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. LINK1140 error with the vcpkg UMFPACK
Qt 6.11 is out! See what's new in the release blog

LINK1140 error with the vcpkg UMFPACK

Scheduled Pinned Locked Moved Unsolved General and Desktop
umfpackc++vcpkgqt4.4
10 Posts 4 Posters 3.7k 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.
  • H Offline
    H Offline
    husseinahazime
    wrote on last edited by husseinahazime
    #1

    Hello friends,

    I'm trying to add an external library a desktop QT project I'm working on. I installed the UMFPACK package using the cmd after pulling the vcpkg from git. I added the library via the library manager the following code was added to the .pro file

    win32:CONFIG(release, debug|release): LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpack
    else:win32:CONFIG(debug, debug|release): LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpackd
    else:unix: LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpack
    
    INCLUDEPATH += C:/vcpkg-master/installed/x64-windows/include/suitesparse
    DEPENDPATH += C:/vcpkg-master/installed/x64-windows/include/suitesparse
    

    After cleaning the project and run qmake and then build the following error is displayed :

    :-1: error: LNK1104: cannot open file 'libumfpackd.lib'
    

    I'm using the following compiler settings Image settings - follow link

    what would be causing this error ?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Charlie_Hdz
      wrote on last edited by
      #2

      Can you display the whole .pro?

      Had you tried with LIBS?

      Kind Regards,
      Enrique Hernandez
      gearstech.com.mx
      chernandez@gearstech.com.mx

      1 Reply Last reply
      0
      • H Offline
        H Offline
        husseinahazime
        wrote on last edited by husseinahazime
        #3

        This is the whole .pro file , no i didn't try LIBS? what do you mean with LIBS? trying to simulate the libraries outside QT ?

        #-------------------------------------------------
        #
        # Project created by QtCreator 2017-09-17T12:47:31
        #
        #-------------------------------------------------
        
        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
        
        TARGET = GUIv1-1
        TEMPLATE = app
        
        # The following define makes your compiler emit warnings if you use
        # any feature of Qt which has been marked as 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
        
        
        SOURCES += \
                main.cpp \
                mainwindow.cpp \
                qcustomplot.cpp \
            savesettings.cpp \
            functions_solver.cpp \
            mesh.cpp \
            util.cpp \
            borderlayout.cpp
        
        
        HEADERS += \
                mainwindow.h \
            qcustomplot.h \
            savesettings.h \
            functions_solver.h \
            mesh.h \
            util.h \
            borderlayout.h
        
        
        FORMS += \
                mainwindow.ui \
            temp.ui
        
        
        
        
        win32:CONFIG(release, debug|release): LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpack
        else:win32:CONFIG(debug, debug|release): LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpackd
        else:unix: LIBS += -LC:/vcpkg-master/installed/x64-windows/lib/ -llibumfpack
        
        INCLUDEPATH += C:/vcpkg-master/installed/x64-windows/include/suitesparse
        DEPENDPATH += C:/vcpkg-master/installed/x64-windows/include/suitesparse
        
        1 Reply Last reply
        0
        • C Offline
          C Offline
          Charlie_Hdz
          wrote on last edited by
          #4

          Which one is your platform?

          Kind Regards,
          Enrique Hernandez
          gearstech.com.mx
          chernandez@gearstech.com.mx

          H 1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi and welcome to devnet,

            Do you really have a file named libumfpack.lib in the folder you are indicating ?

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

            H 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi and welcome to devnet,

              Do you really have a file named libumfpack.lib in the folder you are indicating ?

              H Offline
              H Offline
              husseinahazime
              wrote on last edited by
              #6

              @SGaist Hello , yes i'm sure that the file exist in the directory i pointed to.

              1 Reply Last reply
              0
              • C Charlie_Hdz

                Which one is your platform?

                H Offline
                H Offline
                husseinahazime
                wrote on last edited by
                #7

                @Charlie_Hdz I have a 64bit machine, however, I was checking now on the QT version installed and I noticed that my qt creator is "Based on Qt 5.9.1 (MSVC 2015, 32 bit)" based on 32bot MSVC and the library I was trying to link to was built for 64bit. however, inside QT I had MSVC2015 64bit compiler. can this be the problem ? should QT be 64bit also?

                jsulmJ 1 Reply Last reply
                0
                • H husseinahazime

                  @Charlie_Hdz I have a 64bit machine, however, I was checking now on the QT version installed and I noticed that my qt creator is "Based on Qt 5.9.1 (MSVC 2015, 32 bit)" based on 32bot MSVC and the library I was trying to link to was built for 64bit. however, inside QT I had MSVC2015 64bit compiler. can this be the problem ? should QT be 64bit also?

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

                  @husseinahazime It doesn't matter whether QtCreator is 32bit or 64bit. What matters is whether you're building a 32bit or 64bit application. What exact Qt version did you install? Also remove lib prefix from

                  -llibumfpack
                  

                  should be

                  -lumfpack
                  

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

                  1 Reply Last reply
                  1
                  • H Offline
                    H Offline
                    husseinahazime
                    wrote on last edited by
                    #9

                    @jsulm I am using Qt 5.9.1 (MSVC 2015, 32 bit).

                    i reviewed the library name and it says libumfpack.lib therefore I used
                    -llibumfpack.

                    do you have any idea why I'm facing such a problem?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      The lib prefix should be dropped like @jsulm suggested.

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

                      1 Reply Last reply
                      1

                      • Login

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