Results 1 to 7 of 7

Thread: Dynamic link libraries

  1. #1
    Join Date
    Apr 2008
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Dynamic link libraries

    Hi Friends,

    I am trying to port one apllication from windows to Mac.
    In windows shared libraries i.e dll concept is used.

    can any one explain whether it work in the same way in mAc or any other way to work with dynamic libraries.How to implement it in Mac Os


    Thanks,
    knrcse
    Last edited by nareshqt; 16th April 2008 at 10:54.

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

    Default Re: Dynamic link libraries

    The technique is similar.

  3. #3
    Join Date
    Apr 2008
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Dynamic link libraries

    Hi,
    thanks for quick reply,

    Actually till now i have worked on Objective-C where we develop framework and we can use it wherever required by linkung it,
    so is ther a way here also to develop as a framework instead of dll.

    thanks,
    knrcse

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

    Default Re: Dynamic link libraries

    I don't know the concept of 'framework' in Objective C, so it's hard to say. A general answer is that you can use code by providing a statically or dynamically linked library, a plugin (which is a dynamic library as well) or simply by including the source code in another project.

  5. #5
    Join Date
    Apr 2008
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Dynamic link libraries

    Can any One explain me the process of Developing and Using Shared Libraries on Mac using QT Classes,
    I tried developing a .dylib. but while building it gave fallowing error



    cd /Users/administrator/DemoDylib
    /Developer/usr/bin/g++-4.0 -o /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/libDemoDylib.dylib -L/Users/administrator/DemoDylib/build/Release -F/Users/administrator/DemoDylib/build/Release -F/Users/administrator/DemoDylib -filelist /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/libDemoDylib.LinkFileList -framework Carbon -framework QtGui -framework QtCore -arch i386 -Wl,-single_module -compatibility_version 1 -current_version 1 -install_name /usr/local/lib/libDemoDylib.dylib -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.4 -Wl,-dead_strip -no_dead_strip_inits_and_terms -isysroot /Developer/SDKs/MacOSX10.4u.sdk
    ld: Undefined symbols:
    __ZN7QString4freeEPNS_4DataE
    __ZN7QWidget6resizeERK5QSize
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN11QPushButtonC1ERK7QStringP7QWidget
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN11QPushButtonD1Ev
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QDialogC2EP7QWidget6QFlagsIN2Qt10WindowTypeEE
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QDialogD2Ev
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QObject7connectEPKS_PKcS1_S3_N2Qt14Connection TypeE
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QString16fromAscii_helperEPKci
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QString4freeEPNS_4DataE
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZN7QWidget6resizeERK5QSize
    /Users/administrator/DemoDylib/build/DemoDylib.build/Release/DemoDylib.build/Objects-normal/i386/Demo.o reference to undefined __ZTV4Demo
    /Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit command failed



    please tell me how to do it,

    Thanks,
    knrcse

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

    Default Re: Dynamic link libraries

    Looks like you forgot to link against Qt libraries. Did you use qmake to build the library?

  7. #7
    Join Date
    Apr 2008
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Thumbs down Re: Dynamic link libraries

    Hi,

    how we will mention which symbols are to be exported and not.
    is ther any option in qmake command.

    thanks,
    knrcse

Similar Threads

  1. Dynamic qt libraries on a "clean" pc
    By giotto in forum Installation and Deployment
    Replies: 4
    Last Post: 11th March 2008, 12:20
  2. i want dynamic link my programm
    By coder1985 in forum Installation and Deployment
    Replies: 5
    Last Post: 19th November 2007, 10:59
  3. having both static and dynamic libraries?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 7th May 2007, 07:33
  4. Hot to define the directory for the dynamic libraries?
    By Dark_Tower in forum Qt Programming
    Replies: 5
    Last Post: 28th December 2006, 22:15
  5. Qt 3.3 libraries
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 21st December 2006, 17:25

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.