6

I am a complete beginner to Qt. In a test scenario I need to call a user32 function for some reasons. My small application compiles, but does not link due to the missing user32.lib

Fixing this seemed to be straight forward, add library as shown below. But I cannot proceed to the next step as shown in the screenshot. I have tried almost every library type / setting combination, but the library path always appears in red and I cannot continue. I have even copied the lib on a drive root level in order to avoid any spaces in the path. Any hints?

Remarks:

  1. This question ( Linking to user32.lib in QTCreator ) is a follow up situation after the library had been added this way. This is no duplicate.
  2. Environment QtCreator 2.4.1 Win7
  3. Workaround via LIBS += found below, but why is the dialog permitting me to continue?

Add library in QtCreator

4

1 に答える 1

5

質問の時点でGUIを介してQtCreatorプロジェクトに外部.aライブラリを追加するにはどうすればよいですか?私は(.proファイルに追加された)実用的な解決策を見つけました:

win32 {
  LIBS += "P:\Microsoft SDKs\Windows\v7.1\Lib\User32.Lib"
}

しかし、私はまだ上記のダイアログで何が間違っているのか興味がありますか?

備考:修正されたようです。以下のmlvljrのコメントを参照してください。

于 2012-06-13T20:50:18.897 に答える