none
platform tools xp error on link RRS feed

  • Question

  • I'm building the open source python sources (2.7.3), but need to build Windows XP compatible images. Without platform tools set to XP (e.g. the project file uses <PlatformToolset>v110_xp</PlatformToolset>), the solution builds correctly. Setting the project files to use XP with the above addition, all projects in the solution EXCEPT ONE builds successfully. 

    As I understand it, to indicate to the linker that XP compatible images are to be built, ",5.02" is appended to /SUBSYSTEM:<yoursubsystem>,"5.02". I this particular case, not subsystem is generated on the link line and ",5.02" is left dangling in the middle of the command (see below).

    1) If this is a bug, how do I report it officially?

    2) If there is a simple workaround, please let me know!

    Thanks,

    Wim

    --------------------------------------------------

    The link line generated by VS2012 is:

           Link:
             C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\src\splunk\current\contrib\Python-2.7.3\PC\V
    S8.0\\amd64\_ctypes.pyd" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\\amd64\\" kernel32.lib user32.lib gdi32.lib winsp
    ool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST:NO /DEBUG /PDB:"C:\src\splunk\current\contrib\Py
    thon-2.7.3\PC\VS8.0\\amd64\_ctypes.pdb" ,"5.02" /LTCG /TLBID:1 /BASE:"0x1D1A0000" /DYNAMICBASE:NO /IMPLIB:"C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\\
    amd64\_ctypes.lib" /MACHINE:X64 /EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE /DLL "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-
    temp-Release\_ctypes\win64.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\_ctypes.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\callbacks.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\callproc.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\cfield.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\ffi.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\malloc_closure.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\prep_cif.obj"
             "C:\src\splunk\current\contrib\Python-2.7.3\PC\VS8.0\x64-temp-Release\_ctypes\stgdict.obj"
         1>LINK : fatal error LNK1181: cannot open input file ',5.02'

    Friday, January 18, 2013 6:35 PM

Answers

  • Well, I figured it out and will answer my own question. The project file for _ctypes has a subsystem set as "NotSet" (e.g. <SubSystem>NotSet></SubSystem>). The workaround is to specify a windows subsystem, as this is a .dll. 

    It is probably a bug too -- if the subsystem is NotSet, Visual Studio should not append a platform tool qualifier.

    Regards,

    Wim

    • Marked as answer by wimcolgate Friday, January 18, 2013 6:59 PM
    Friday, January 18, 2013 6:58 PM

All replies

  • Well, I figured it out and will answer my own question. The project file for _ctypes has a subsystem set as "NotSet" (e.g. <SubSystem>NotSet></SubSystem>). The workaround is to specify a windows subsystem, as this is a .dll. 

    It is probably a bug too -- if the subsystem is NotSet, Visual Studio should not append a platform tool qualifier.

    Regards,

    Wim

    • Marked as answer by wimcolgate Friday, January 18, 2013 6:59 PM
    Friday, January 18, 2013 6:58 PM
  • Glad to see this issue has been resolved and thank you for sharing your solutions here. 

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 21, 2013 9:31 AM
    Moderator