Jul 16, 2012

Hướng dẫn cài đặt Qt library trên Visual Studio 2010.

Lưu ý: Cài đặt hoặc nâng cấp Visual Studio 2010 lên Service Pack

Download và giải nén source code của Qt: Link download. Đối với các bản trên 4.8 cần cài đặt Perl.

Giả sử giải nén và chép sang thư mục: C:\QtFw

Cài đặt biến môi trường. Dùng cmd:

QTDIR = C:\QtFw
QMAKESPEC = win32-msvc2010
Code cmd:
Setx QTDIR C:\QtFw
Setx  QMAKESPEC  win32-msvc2010

Thêm C:\QtFw\bin vào biến PATH (Trong System Properties--Advanced--Enviroment Variables ).

Để sử cài đặt Qt cho x86 ( ngay cả khi dùng win 64bit nhưng tạo ứng dụng x86 thì vẫn phải xài bản này): Mở Visual Studio Command Prompt. Đối với 64bit Qt library - để xây dựng các ứng dụng 64bit: Mở Visual Studio x64 Win64 Command Prompt.

Gõ lệnh sau

Cd C:\QtFw
Configure -platform win32-msvc2010 -debug-and-release -no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast
Nmake.

Ngồi đợi …

Download và cài đặt Qt Visual Studio Add-in.

Trong menu Qt trong VS2010. Qt < Qt Options < Qt Versions < Add.

Sau đó có thể create 1 project Qt trong VS2010 giống như tạo một project thông thường.

Cách này chỉ hiệu quả cho bản thương mại của VS2010, còn bản Express không cài Qt Visual Studio Add-in được nên có cách khác. Sẽ được post sau.

7 comments:

  1. Anonymous2/4/13 17:16

    I want to to thank you for this excellent read!
    ! I absolutely enjoyed every little bit of it. I have got you bookmarked to look
    at new things you post…

    Also visit my webpage: nora ephron quotes

    ReplyDelete
  2. Anonymous2/4/13 20:22

    An intriguing discussion is definitely worth comment.
    I think that you need to write more on this topic, it may not be a taboo matter but usually folks
    don't discuss these issues. To the next! Many thanks!!

    Also visit my web-site hatred quotes

    ReplyDelete
  3. Anonymous2/4/13 23:10

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.
    I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

    Visit my webpage: frida kahlo quotes

    ReplyDelete
  4. Anonymous3/4/13 05:20

    Have you ever thought about including a little bit more than
    just your articles? I mean, what you say is valuable and everything.
    Nevertheless think of if you added some great photos or video clips to give your posts more, "pop"!

    Your content is excellent but with images and videos, this site could undeniably be one of the very best in
    its field. Amazing blog!

    Look at my page depressing quotes

    ReplyDelete
  5. Anonymous3/4/13 05:21

    An intriguing discussion is definitely worth comment.
    I do think that you should publish more about this subject, it may not be a taboo matter but generally
    folks don't discuss such subjects. To the next! Many thanks!!

    My web site: country flags

    ReplyDelete
  6. Anonymous3/4/13 05:58

    I'm impressed, I have to admit. Seldom do I encounter a blog that's equally educative and entertaining, and let me
    tell you, you've hit the nail on the head. The issue is something not enough men and women are speaking intelligently about. I'm very
    happy that I found this during my search for something relating
    to this.

    my blog - frustration quotes

    ReplyDelete
  7. Anonymous11/4/13 07:45

    progressively, new bloggers are not teenagers with her blogging correct after a scrap with her young man.



    Also visit my web site: click here

    ReplyDelete