Results 1 to 9 of 9

Thread: Need to create a dll

  1. #1
    Join Date
    Jun 2012
    Location
    Cape town
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Need to create a dll

    I am having quite a bit of trouble trying to compile a c++ file with qmake. I have been given a c++ file and a .pro file to work with. The steps I've followed are as follows:

    Open cmd
    cd C:\nukePlugins\nukePlugins_\monitorSocket
    C:\Qt\4.8.1_x64\qmake\qmake.exe
    This creates "debug" and "release" folders as well as "Makefile", "Makefile.Debug" and "Makefile.Release" files. But no dll. What is the next step in this process?

    If it helps the contents of the .pro file are below:

    # -------------------------------------------------
    # Project created by QtCreator 2009-11-12T14:20:23
    # -------------------------------------------------

    #NDKDIR = C:/Program Files/Nuke6.1v3
    NDKDIR = C:/Program Files/Nuke6.1v3

    #CONFIG += plugin qdbus
    CONFIG += plugin

    QT += core \
    network \
    gui

    #DESTDIR = ~/.nuke/
    TARGET = monitorSocket

    #QMAKE_CXX = g++-4.1
    QMAKE_RPATHDIR = /usr/lib

    TEMPLATE = lib
    DEFINES += USE_GLEW
    SOURCES += monitorSocket.cpp
    #HEADERS += monitorSocket_global.h

    INCLUDEPATH += $$NDKDIR/include

    #LIBS += -lDDImage -L$$NDKDIR
    LIBS += -L$$NDKDIR

    QMAKE_CXXFLAGS += -g

    macx:QMAKE_LFLAGS_PLUGIN += -undefined suppress -flat_namespace

    unix:QMAKE_POST_LINK = cp libmonitorSocket.so ~/.nuke/monitorSocket.so
    macx:QMAKE_POST_LINK = cp libmonitorSocket.dylib ~/.nuke/monitorSocket.dylib
    Also I notice below there is a section:

    macx:QMAKE_LFLAGS_PLUGIN += -undefined suppress -flat_namespace
    unix:QMAKE_POST_LINK = cp libmonitorSocket.so ~/.nuke/monitorSocket.so
    macx:QMAKE_POST_LINK = cp libmonitorSocket.dylib ~/.nuke/monitorSocket.dylib
    do I need to add something for win32?

    I.e win32:QMAKE_POST_LINK = cp libmonitorSocket.dll ~/.nuke/monitorSocket.dll

  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: Need to create a dll

    You need to run make.
    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.


  3. #3
    Join Date
    Jun 2012
    Location
    Cape town
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need to create a dll

    Thanks, in cmd in the folder that the files are do I just type "make" and hit enter (tried that and didn't work) or can you please give an example

  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: Need to create a dll

    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
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Need to create a dll

    dear DDHarLiN, I imagine that you're under Windows. Which compiler uses Qt (MinGW 4.4 or MSVC++) ?
    If like me you use MinGW 4.4, runs the shell command:
    START | Programs | Qt by Nokia v4.8.1 (MinGW OpenSource) | Qt 4.8.1 Command Prompt

    then go to the directory of your project to be compiled (where the file is present .pro), then type:

    qmake && make

  6. #6
    Join Date
    Jun 2012
    Location
    Cape town
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need to create a dll

    Thanks Giorgik

    Ive done like you have said, this is what the line looks like:

    C:\nukeplugins\monitorsocket>qmake && c:\minGW\msys\1.0\make.exe

    But then i get this error everytime:

    /usr/bin/make -f Makefile.debug
    make[1]: Entering directory '/c/nukeplugins/monitorsocket'
    Makefile.debug:59: *** missing seperator. Stop.
    make[1]: Leaving directory '/c/nukeplugins/monitorsocket'
    make: *** [debug] Error 2

  7. #7
    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: Need to create a dll

    Use mingw32-make as the docs advise.
    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.


  8. #8
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    149
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Need to create a dll

    DDHarLiN, you must use the version of MinGW 4.4. For as long as it vai the site:
    http://get.qt.nokia.com/misc/MinGW-gcc440_1.zip
    Then you have to use the library Qt 4.8.1:
    http://releases.qt-project.org/qt4/s....8.2-mingw.exe
    while the source to compile Qt-Creator 2.5:
    http://get.qt.nokia.com/qtcreator/qt...-2.5.0-src.zip

  9. #9
    Join Date
    Aug 2012
    Posts
    3
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Cool new to Qt but i am so curious to know something about

    i have started my basics of Qt, in one my book,
    my questio is :

    how do i write a program that ask user to enter a number, and then checks weather the number is prime or not.it should use a QInputDialog to get number from the user and QMessage to display the result.

    i have created my projects, below is my main.cpp:

    #include<QApplication>
    #include<QMessageBox>
    #include<QInputDialog>

    int main( int argc, char **argv )
    {
    QApplication app(argc, argv);



    return 0;
    }


    and below is .pro


    SOURCES += \
    Question1.cpp



    thank you

Similar Threads

  1. Qt in VS does not create an .exe
    By Nazgul in forum Installation and Deployment
    Replies: 7
    Last Post: 14th August 2012, 09:34
  2. How do I create a DLL for QT
    By zartoch in forum Newbie
    Replies: 2
    Last Post: 8th May 2009, 06:28
  3. Replies: 4
    Last Post: 1st May 2009, 11:00
  4. Create tab?
    By songthanjp in forum Qt Tools
    Replies: 4
    Last Post: 12th March 2008, 16:11
  5. how to create pop-ups
    By miguel_mark in forum Newbie
    Replies: 1
    Last Post: 22nd October 2007, 06:16

Tags for this Thread

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.