Results 1 to 9 of 9

Thread: About link in Visual Studio 2003

  1. #1
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default About link in Visual Studio 2003

    I use gecko-sdk and Qt4 in Visual Studio 2003 .

    I succeed in linking my project with IDE(Visual Studio 2003), but failed window console.

    the infomation is :
    Microsoft Windows XP [版本 5.1.2600]
    (C) 版权所有 1985-2001 Microsoft Corp.

    link /LIBPATH:"c:\QT\4.3.1\lib" /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:CONSO
    LE /NODEFAULTLIB:libc /OUT:..\..\src\C++\bin\ObjectBuilder.exe @C:\DOCUME~1\ADMI
    NI~1\LOCALS~1\Temp\nm43.tmp
    xpcomglue.lib(nsGREDirServiceProvider.obj) : error LNK2019: 无法解析的外部符号 _
    _imp__RegCloseKey@4 ,该符号在函数 _GRE_GetGREPath 中被引用
    xpcomglue.lib(nsGREDirServiceProvider.obj) : error LNK2019: 无法解析的外部符号 _
    _imp__RegQueryValueExA@24 ,该符号在函数 _GRE_GetGREPath 中被引用
    xpcomglue.lib(nsGREDirServiceProvider.obj) : error LNK2019: 无法解析的外部符号 _
    _imp__RegOpenKeyExA@20 ,该符号在函数 _GRE_GetGREPath 中被引用
    ..\..\src\C++\bin\ObjectBuilder.exe : fatal error LNK1120: 3 个无法解析的外部命

    NMAKE : fatal error U1077: “link” : 返回代码“0x460”
    Stop.

    but i can succeed in IDE., just some warnings. as follow:
    INK : warning LNK4068: 未指定 /MACHINE;默认设置为 X86
    LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;使用 /NODEFAULTLIB:library
    xpcomglue.lib(nsCOMPtr.obj) : warning LNK4099: 未发现 PDB“xpcomglue.pdb”有“D:\CTP-6800\code\src\C++/lib/xpcomglue.lib”或者在“d:\Ctp-6800\code\src\C++\bin\xpcomglue.pdb”中;正在链接对象 ,如同没有调试信息一样
    xpcomglue.lib(nsDebug.obj) : warning LNK4099: 未发现 PDB“xpcomglue.pdb”有“D:\CTP-6800\code\src\C++/lib/xpcomglue.lib”或者在“d:\Ctp-6800\code\src\C++\bin\xpcomglue.pdb”中;正在链接对象 ,如同没有调试信息一样
    xpcomglue.lib(nsMemory.obj) : warning LNK4099: 未发现 PDB“xpcomglue.pdb”有“D:\CTP-6800\code\src\C++/lib/xpcomglue.lib”或者在“d:\Ctp-6800\code\src\C++\bin\xpcomglue.pdb”中;正在链接对象 ,如同没有调试信息一样
    xpcomglue.lib(nsXPCOMGlue.obj) : warning LNK4099: 未发现 PDB“xpcomglue.pdb”有“D:\CTP-6800\code\src\C++/lib/xpcomglue.lib”或者在“d:\Ctp-6800\code\src\C++\bin\xpcomglue.pdb”中;正在链接对象 ,如同没有调试信息一样
    xpcomglue.lib(nsGREDirServiceProvider.obj) : warning LNK4099: 未发现 PDB“xpcomglue.pdb”有“D:\CTP-6800\code\src\C++/lib/xpcomglue.lib”或者在“d:\Ctp-6800\code\src\C++\bin\xpcomglue.pdb”中;正在链接对象 ,如同没有调试信息一样
    生成日志保存在“file://d:\Ctp-6800\code\unitTest\ObjectBuilder\objs\\BuildLog.ht m”中
    ObjectBuilder - 0 错误,7 警告
    ---------------------- 完成 ---------------------

    生成: 1 已成功, 0 已失败, 0 已跳过


    thanks
    Last edited by jpn; 15th January 2008 at 08:44. Reason: missing [quote] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About link in Visual Studio 2003

    Do you use the same project/make file in the two environments?

  3. #3
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: About link in Visual Studio 2003

    Quote Originally Posted by wysota View Post
    Do you use the same project/make file in the two environments?
    yes, i am sure

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About link in Visual Studio 2003

    Then it is not possible to receive two different results. If that happens, you are either using different environments or build steps are different. There are no other possibilities. Check if the linker commands issued from both builds are exactly the same.

  5. #5
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: About link in Visual Studio 2003

    In IDE, I can't find the file 'Makefile' in the project folder.



    In console, i do as follows:

    (1) qmake projectName.pro

    then i can find the file Makefile makefile.release makefile.debug 3 files

    (2) nmake

    but failed.

  6. #6
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: About link in Visual Studio 2003

    Quote Originally Posted by wysota View Post
    Then it is not possible to receive two different results. If that happens, you are either using different environments or build steps are different. There are no other possibilities. Check if the linker commands issued from both builds are exactly the same.
    i don't know how to find out the difference between IDE and console

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About link in Visual Studio 2003

    Visual Studio doesn't use the .pro file, thus the difference between the two builds. You are probably missing some file in the .pro file that contains those missing symbols. Either create a proper project file or generate a makefile from the Visual Studio project (don't ask me how, I don't know).

  8. The following user says thank you to wysota for this useful post:

    vencent (16th January 2008)

  9. #8
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: About link in Visual Studio 2003

    set QMAKESPEC = win32-msvc.net

    and then modify $QTDIR/mkspecs/win32-msvc.net/qmake.conf


    QMAKE_LINK* = link /NODEFAULTLIB:MSVCRT /DEFAULTLIB:ADVAPI32


    enjoy!~

  10. #9
    Join Date
    Dec 2007
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: About link in Visual Studio 2003

    wysota , thanks

Similar Threads

  1. Replies: 4
    Last Post: 24th November 2007, 13:33
  2. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17
  3. Compile App using OpenGL and Visual Studios 2003
    By Rayven in forum General Programming
    Replies: 3
    Last Post: 26th April 2007, 15:43
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. link error for visual studio.net 2003
    By berlin in forum Newbie
    Replies: 9
    Last Post: 29th September 2006, 16:06

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
  •  
Qt is a trademark of The Qt Company.