Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:17:52+00:00 2026-06-16T00:17:52+00:00

Q_DECL_EXPORT int main(int argc, char **argv) What does this Q_DECL_EXPORT before int main(…) means?

  • 0

Q_DECL_EXPORT int main(int argc, char **argv)

What does this Q_DECL_EXPORT before int main(...) means?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:17:52+00:00Added an answer on June 16, 2026 at 12:17 am

    Excerpt from QT docs:

    Depending on your target platform, Qt provides special macros that
    contain the necessary definitions:

    • Q_DECL_EXPORT must be added to the declarations of symbols used when compiling a shared library.
    • Q_DECL_IMPORT must be added to the declarations of symbols used when compiling a client that uses the shared library.

    I haven’t check the QT code, but most likely this macro will do following:

    #ifdef _WIN32 || _WIN64
        #define Q_DECL_EXPORT __declspec(dllexport)
        #define Q_DECL_IMPORT __declspec(dllimport)
    #else
        #define Q_DECL_EXPORT
        #define Q_DECL_IMPORT
    #endif
    

    __declspec(dllimport) and __declspec(dllexport) tells the linker to import and export (respectively) a symbol from or to a DLL. This is Windows specific.

    In your particular case this macro probably could be removed, since main() most likely is not part of a library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a little program with Qt. I have a main.cpp with
Q is similar to this: use a list of values to select rows from
Q : How to add OR operator at $criteria ? reference from here This
Q: How does Web Applications differ from SmartPhone Applications (Iphone, Windows Mobile, Android/Nexus Application)
Q: I have a list of objects like this: List<object> entities = GetallEntities(); The
Q: How can I fix this problem without hacking the tutorial code too much?
Q: I wanna to know how to use this jquery in asp.net.(steps) $(...).scollTo( $('<%=
I saw the Qt source code like this: class Q_CORE_EXPORT QBasicAtomicInt { public: ...
Q: Does a colon : in an array key have any special significance? From
Q : I want to make the header in my report like this but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.