Results 1 to 3 of 3

Thread: creating dll problem -> no exports ...

  1. #1
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default creating dll problem -> no exports ...

    hi,

    i can't import functions from the dll in other programs written in Delphi or Visual Studio...

    the header file

    .
    .
    .
    #include <qt_windows.h>
    #include <qglobal.h>

    #ifdef _DLL_BUILD_
    # define DLL_EXPORT Q_DECL_EXPORT
    #else
    # define DLL_EXPORT Q_DECL_IMPORT
    #endif

    bool DLL_EXPORT rsXML2CSV( char *fileName );
    .
    .
    .

    the source file

    .
    .
    .
    bool DLL_EXPORT rsXML2CSV( char *fileName )
    {
    QXMLExtractor exp( fileName, NULL, "QXLMEX" );
    return( true );
    }
    .
    .
    .

    the compiler output

    MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
    bcc32 -c -tWR -w -w-hid -tWM -O2 -x- -D_DLL_BUILD_ -DQT_DLL -DQT_THREAD_
    SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3.1.2\include" -I"C:\Projekte\qt\fes\dimdi\dll" -
    I"C:\Qt\3.1.2\mkspecs\win32-borland" -oqxmlextractor.obj ..\qxmlextractor.cpp
    Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
    ..\qxmlextractor.cpp:
    Error E2141 ..\qxmlextractor.h 30: Declaration syntax error
    Error E2238 ..\qxmlextractor.cpp 280: Multiple declaration for 'Q_DECL_EXPORT'
    Error E2344 ..\qxmlextractor.h 30: Earlier declaration of 'Q_DECL_EXPORT'
    Error E2141 ..\qxmlextractor.cpp 280: Declaration syntax error
    *** 4 errors in Compile ***

    ** error 1 ** deleting qxmlextractor.obj

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: creating dll problem -> no exports ...

    Q_DECL_EXPORT and Q_DECL_IMPORT macros might not be available in Qt 3.1.2.

    Try:
    Qt Code:
    1. #ifndef Q_OS_UNIX
    2. # ifdef _DLL_BUILD_
    3. # define DLL_EXPORT __declspec(dllexport)
    4. # else
    5. # define DLL_EXPORT __declspec(dllimport)
    6. # endif
    7. #else
    8. # define DLL_EXPORT
    9. #endif
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to jacek for this useful post:

    vrudolf (30th July 2006)

  4. #3
    Join Date
    Jul 2006
    Posts
    4
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: creating dll problem -> no exports ...

    @jacek

    thx...

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Problem in creating thread in GUI application
    By jyoti kumar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:05
  3. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  4. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.