Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Armadillo QT Editor Windows 7



  • Hi everyone,

    I keep getting the following error, among others:

    C:\Users\Phil\Desktop\TITO\Armadillo\armadillo-9.400.3\include\armadillo_bits\wrapper_blas.hpp:189: error: undefined reference to `ddot'

    I have my pro file as follows:

    TEMPLATE = app
    CONFIG += console c++11
    CONFIG -= app_bundle
    CONFIG -= qt

    SOURCES +=
    main.cpp

    #INCLUDEPATH += C:\armadillo-9.400.3\include \

    #LIBS += \

    -LC:\armadillo-9.400.3\lib_win64\

    -llibblas32 \

    -lliblapack32

    INCLUDEPATH += C:\Users\Phil\Desktop\TITO\Armadillo\armadillo-9.400.3\include \

    LIBS +=
    -LC:\Users\Phil\Desktop\TITO\Armadillo\armadillo-9.400.3\examples\lib_win64
    -llapack_win64_MT
    -lblas_win64_MT

    How do I fix this error? Thank you so much!


  • Lifetime Qt Champion

    @helpPls

    I'm not sure this is the actual problem, but I had such a problem before:

    -LC:\armadillo-9.400.3\lib_win64\

    1. prefer forward slash / over backslash \ (also in C++ source code)
    2. Remove the trailing slash. It can be interpreted as line continuation

    To further debug your problem, please find out which library is defining your missing symbol.

    Regards



  • @aha_1980

    Hi! This is the error message I'm getting...

    C:\Users\Phil\Desktop\TITO\build-armadilllo_test-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\debug\main.o:-1: In function `ZN4arma4blas3dotIdEET_jPKS2_S4_':



  • @helpPls What's the whole error message? That just looks like the first line of one.



  • @wrosecrans

    This isn't the whole thing...

    C:\Users\Phil\Desktop\TITO\build-armadilllo_test-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\debug\main.o:-1: In function ZN4arma4blas3dotIdEET_jPKS2_S4_': C:\Users\Phil\Desktop\TITO\Armadillo\armadillo-9.400.3\include\armadillo_bits\wrapper_blas.hpp:189: error: undefined reference toddot'
    C:\Users\Phil\Desktop\TITO\build-armadilllo_test-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\debug\main.o:-1: In function ZN4arma6lapack5getrfIdEEvPiS2_PT_S2_S2_S2_': C:\Users\Phil\Desktop\TITO\Armadillo\armadillo-9.400.3\include\armadillo_bits\wrapper_lapack.hpp:42: error: undefined reference todgetrf'
    C:\Users\Phil\Desktop\TITO\build-armadilllo_test-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\debug\main.o:-1: In function `ZN4arma4blas4gemvIdEEvPKcPKiS5_PKT_S8_S5_S8_S5_S8_PS6_S5_':


  • Lifetime Qt Champion

    @helpPls Did you do what @aha_1980 suggested?



  • @jsulm

    You mean, change / to ? Um...So comments are \ now? That didn't seem like a solution so I didn't try it. Should I?


  • Lifetime Qt Champion

    @helpPls You should use / instead of \ in paths:

    INCLUDEPATH += C:/armadillo-9.400.3/include
    

    "So comments are \ now?" - which comments do you mean? \ is an escape character and at the end of a line in pro files it means that the line continues in the next line:

    LIBS += -LC:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/examples/lib_win64 \
    -llapack_win64_MT \
    -lblas_win64_MT
    


  • @jsulm

    Hi..so my pro file looks like this now. The new error message is at the bottom.

    TEMPLATE = app
    CONFIG += console c++11
    CONFIG -= app_bundle
    CONFIG -= qt

    SOURCES += /
    main.cpp

    #INCLUDEPATH += C:/armadillo-9.400.3/include

    #LIBS += /

    -LC:/armadillo-9.400.3/lib_win64/

    -llibblas32 /

    -lliblapack32

    INCLUDEPATH += C:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/include

    LIBS +=
    -LC:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/examples/lib_win64
    -llapack_win64_MT
    -lblas_win64_MT

    :-1: error: fatal error: no input files


  • Lifetime Qt Champion

    @helpPls

    TEMPLATE = app
    CONFIG += console c++11
    CONFIG -= app_bundle
    CONFIG -= qt
    
    SOURCES += main.cpp
    
    INCLUDEPATH += C:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/include
    
    LIBS += -LC:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/examples/lib_win64 \
    -llapack_win64_MT \
    -lblas_win64_MT
    

  • Lifetime Qt Champion

    Hi @helpPls

    please adopt your pro file to what @jsulm suggested.

    Further:

    1. C:/Users/Phil/Desktop/TITO/Armadillo/armadillo-9.400.3/examples/lib_win64 - is it really examples/lib?

    2. You are using a MinGW-32-Bit Kit, but give the linker a lib_win64 directory - is that correct?



  • @aha_1980

    Hi..thank you for trying to help me. I adopted @jsulm's pro file and get the exact same errors. For 1., yes, that's where my files are. For 2., I tried it with MinGW-64 and it doesn't matter. It's all the same. Extremely frustrating. Wow, I just don't know what else to do.


  • Lifetime Qt Champion

    @helpPls Please post you current pro file and please use the </> tags to encode it as code.
    You can also check generated Makefile.
    And post the complete compiler/linker output.


  • Lifetime Qt Champion

    Hi @helpPls,

    and just to add to @jsulm, which files are actually located in the lib_win64 directory? Under Windows, you have linker include files for MSVC and MinGW compiler, and they are not compatible. Also, as already said, 32-bit and 64-bit libraries are also impossible to mix.

    Regards


Log in to reply