Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. "#pragma comment" with .lib - unknown pragma ignored.
Forum Updated to NodeBB v4.3 + New Features

"#pragma comment" with .lib - unknown pragma ignored.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BD9a
    wrote on last edited by
    #1

    Hello, how can I link "crypt32.lib" to my program? I have static QT with MinGW.
    There is my config for compile static QT:

        cmd /c "configure.bat -static -release -platform win32-g++ -prefix $QtDir `
            -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sqlite -no-openssl `
            -opensource -confirm-license `
            -make libs -nomake tools -nomake examples -nomake tests"
    

    In Visual Studio this '#pragma comment(lib, "crypt32.lib")' works well.
    For addition I have:

    int wmain( int argc, wchar_t *argv[])
    
    undefined reference to `WinMain'
    

    How can I properly include this crypt32.lib when using static qt?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Well in the normal Qt - mingw (non static)
      Adding
      LIBS += -LC:/Windows/System32 -lcrypt32
      to the .pro file seems to work.

      1 Reply Last reply
      1
      • B Offline
        B Offline
        BD9a
        wrote on last edited by BD9a
        #3

        Still getting "undefined reference to `WinMain'" error.

        I found an issue, I cant use wchar_t* in main as attribute.
        Its possible to use this data type as main attribute?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved