Results 1 to 4 of 4

Thread: Qt add library

  1. #1
    Join Date
    May 2010
    Posts
    5

    Default Qt add library

    Hi, I want to add library dicom

    My teacher gave me a tutorial:

    1) Download boost
    2) Extract to e.g. \osm\boost_1_42_0 (i use d:\osm\...)

    Qt Console (in \osm\boost_1_42_0):
    3) bootstrap.bat
    4) bjam --toolset=gcc
    5) wait

    6) download dicomlib, socket i utility from http://code.google.com/p/dicomlib
    7) Extract. Make tree:
    \osm\dicomlib
    \osm\socket
    \osm\utility
    8) (in \osm\dicomlib):
    g++ -c *.cpp -I.. -I../boost_1_42_0
    g++ -shared *.o ./boost_1_42_0/bin.v2/threads/../../...threads.a -o dicom.dll

    During compilation may be errors. You probably have to change
    in FileMetaInformation.cpp comment TiffHeader.h

    and add:
    #include <algorithm>
    #include <string.h>

    you wil see...

    9) link to dicomlib.dll

    In *.pro add
    INCLUDEPATH += d:\osm
    LIBS += -Ld:\osm\dicomlib -ldicom

    in source

    #include <dicomlib/dicomlib.hpp>


    everythink was good to 8 point.
    i also done 9 point
    but when i buil program:

    mingw32-make: Leaving directory `E:/uzytki/polibuda/Sem 8/OSM/testsqllite'
    mingw32-make: Entering directory `E:/uzytki/polibuda/Sem 8/OSM/testsqllite'
    D:/Qt/2010.02.1/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `E:/uzytki/polibuda/Sem 8/OSM/testsqllite'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debug/testsqllite.exe debug/main.o -L'd:/Qt/2010.02.1/qt/lib' -Ld:\osm\dicomlib -ldicom -lQtSqld4 -lQtCored4
    mingw32-make[1]: Leaving directory `E:/uzytki/polibuda/Sem 8/OSM/testsqllite'
    mingw32-make: Leaving directory `E:/uzytki/polibuda/Sem 8/OSM/testsqllite'
    d:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -ldicom
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug/testsqllite.exe] Error 1
    mingw32-make: *** [debug] Error 2

    My teacher send also same .dll file but i dont know what to do with this

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt add library

    so dicom.lib is in /osm/dicomlib/ ?

  3. #3
    Join Date
    May 2010
    Posts
    5

    Default Re: Qt add library

    No there is only dicomlib.dll i copy that file there
    maybe i do sth wrong in point 8?

  4. #4
    Join Date
    Mar 2011
    Posts
    53
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt add library

    Can anyone help me? I have a big problem I need to get this work on UBUNTU, I've succesfully compiled the library, in program everything works well with linking and compiling with it, however when the program comes to do this:

    1) dicom:ataSet dset;
    2) dicom::Read(file.toStdString(), dset);

    I get this output error-information:
    terminate called after throwing an instance of 'dicom::exception'
    what(): Syntax not recognised.

    In debug the whole stops at the line nr 2, I have no idea why, please help

Similar Threads

  1. Replies: 4
    Last Post: 18th December 2009, 18:55
  2. KDE library and QT
    By SimbadSubZero in forum KDE Forum
    Replies: 1
    Last Post: 2nd December 2009, 21:17
  3. Replies: 1
    Last Post: 13th August 2009, 16:32
  4. Library qt-mt
    By batileon in forum Newbie
    Replies: 6
    Last Post: 10th June 2008, 11:54
  5. Qt3 library in Qt4 app
    By Opilki_Inside in forum Qt Programming
    Replies: 3
    Last Post: 24th May 2006, 16:22

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.