Results 1 to 8 of 8

Thread: DLL linking problem after putting winavr on path

  1. #1
    Join Date
    Oct 2012
    Posts
    5
    Qt products
    Qt3
    Platforms
    Windows

    Default DLL linking problem after putting winavr on path

    I have a fully working application compiled using qt 5.0 and it uses fftw and qwtplot Dlls.
    I also have to work with the winavr for my project.
    However once i add winavr folder to path, qt shows error like DDocumentsQtIPtest-build-Desktop_Qt_5_0_1_MinGW_32bit-Releasereleaselibfftw3-3.dll: No such file or directory.
    I mean where are all the / i had given between each word.
    I checked and found out my console qt application are working fine though.
    Is it qt problem or winavr?
    If it is winavr's problem, why does the console application works perfectly??
    Please help me..

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    show pro file
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    Oct 2012
    Posts
    5
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    Qt Code:
    1. QT += core gui
    2.  
    3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    4.  
    5. TARGET = "Bin Mini PS"
    6. TEMPLATE = app
    7.  
    8. SOURCES += main.cpp\
    9. mainwindow.cpp \
    10. spatial.cpp \
    11. frequency.cpp \
    12. SegmentationNothers.cpp
    13.  
    14. HEADERS += mainwindow.h
    15. INCLUDEPATH += C:\Qwt\include
    16. FORMS += mainwindow.ui
    17.  
    18. INCLUDEPATH += C:\Qwt-6.1.0-rc3\include
    19. #LIBS += C:\Qwt-6.1.0-rc3\lib\qwtd.dll
    20. INCLUDEPATH += C:\fftw-3.3.3-dll32
    21. LIBS += D:\DDocuments\Qt\IP\test-build-Desktop_Qt_5_0_1_MinGW_32bit-Release\release\libfftw3-3.dll
    22. LIBS += D:\DDocuments\Qt\IP\test-build-Desktop_Qt_5_0_1_MinGW_32bit-Release\release\qwt.dll
    23.  
    24. OTHER_FILES += \
    25. iconw.rc
    26. RC_FILE = iconw.rc
    To copy to clipboard, switch view to plain text mode 
    This is my pro file .am i doing something wrong??
    The dlls are in release folder..

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: DLL linking problem after putting winavr on path

    Do you have all the libraries you use (e.g. qwt, fftw) built with this compiler?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Oct 2012
    Posts
    5
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    Yes i build them on qt command prompt

  6. #6
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    change \ for / (just guessing)
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  7. #7
    Join Date
    Oct 2012
    Posts
    5
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    hi amleto,
    i have tried using / and double \ ie D:\\DDocuments\\.. both..
    But no luck.
    For now i am removing avr-gcc from path to compile desktop app.
    and again putting it to path for burning avr..
    It would have not been a problem if programmer's notepad (IDE for Winavr) could use avrgcc and avrdude without adding them to path
    just like qtcreator does without adding its exes to path..

  8. #8
    Join Date
    Apr 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: DLL linking problem after putting winavr on path

    Hi,

    I had a similar problem when making qwt dll. So i made some debug and found the the ld parameters where with backslashes (-L parameter). I found that the winavr sh.exe shell was used by the toolchain and the link cmd line was (notice backslashes in :-LC:\Qt\Q...)
    echo linking ../lib/qwtd.dll && g++ -shared -mthreads -Wl,--out-implib,C:/MinGW-Lib/qwt-6.1-rc3/src/../lib/libqwtd.a -o ../lib/qwtd.dll object_script.qwtd.Debug -LC:\Qt\Qt5.0.1\5.0.1\mingw47_32\lib -lQt5OpenGLd -lQt5Svgd -lQt5PrintSupportd -lQt5Widgetsd -lQt5Concurrentd -lQt5Guid -lQt5Cored -llibEGLd -llibGLESv2d -lgdi32 -luser32
    this produce the following errors :
    linking ../lib/qwtd.dll
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5OpenGLd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Svgd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5PrintSupportd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Widgetsd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Concurrentd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Guid
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Cored
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibEGLd
    c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibGLESv2d
    collect2.exe: error: ld returned 1 exit status

    So, i tried manualy running the same command with C:\WinAVR\utils\bin\sh.exe but replacing the backslashes with slashes, and it worked...
    The problem is, when qmake detects a sh.exe, it tries to use it in the toolchain, but this winavr sh.exe does not like backslashes. I didn't try the MSYS shell.
    I found the following in qmake.conf (c:\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\win32-g++\qmake.conf):

    !isEmpty(QMAKE_SH) {
    MINGW_IN_SHELL = 1
    QMAKE_DIR_SEP = /
    include(../common/shell-unix.conf)
    } else {
    include(../common/shell-win32.conf)
    }

    and in spec_pre.prf (c:\Qt\Qt5.0.1\5.0.1\mingw47_32\mkspecs\features\s pec_pre.prf) :

    equals(QMAKE_HOST.os, Windows) {
    QMAKE_EXT_OBJ = .obj
    QMAKE_EXT_RES = .res
    QMAKE_SH =
    PATH = $$(PATH)
    PATH = $$split(PATH, ;)
    for(dir, PATH) {
    exists($$dir/sh.exe) {
    QMAKE_SH = $$dir/sh.exe
    break()
    }
    }
    unset(PATH)
    } else {
    QMAKE_EXT_CPP += .C
    QMAKE_EXT_H += .H
    QMAKE_EXT_OBJ = .o
    QMAKE_SH = sh
    }

    You comment these some lines to force qmake to use the windows shell, not the winavr shell, but it won't work, because mingw32-make also search for a shell, on my case it finds :
    find_and_set_shell() path search set default_shell = C:/WinAVR/utils/bin/sh.exe (from trace file , mingw32-make -d --trace > file)
    So, the easy solution is to temporarily remove winavr from path.... it works, i finaly managed to have qwt.dll and qwt.a compiled...

    I think (I am new to Qt, trying to move from BC++ to Qt) that the problem is within the Qt environment, perhaps in the c:\Users\......\AppData\Roaming\QtProject\qtcreato r\toolchains.xml or profiles.xml, where the pathes are stored with backslashes for the mingw conf. I tried to edit these files, but QtCreator put backslashes again each time i run it....).
    .
    Last edited by f8eho; 7th April 2013 at 15:22.

Similar Threads

  1. Putting text from QList to QLineEdit problem
    By "BumbleBee" in forum Newbie
    Replies: 1
    Last Post: 12th April 2012, 07:49
  2. Problem with qprocess and Path
    By pcoliver in forum Qt Programming
    Replies: 5
    Last Post: 18th September 2011, 11:16
  3. macdeployqt path problem
    By abey in forum Installation and Deployment
    Replies: 0
    Last Post: 10th December 2009, 10:46
  4. Replies: 8
    Last Post: 17th October 2009, 08:10
  5. QDir Path problem
    By ToddAtWSU in forum Qt Programming
    Replies: 3
    Last Post: 21st August 2008, 12:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.