Can I use Visual Studio 2010's C++ compiler with Visual Studio 2008's C++ Runtime Library?

后端 未结 8 1180
走了就别回头了
走了就别回头了 2020-11-27 02:51

I have an application that needs to operate on Windows 2000. I\'d also like to use Visual Studio 2010 (mainly because of the change in the definition of the auto

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 03:24

    As Visual Studio comes with support for MASM (see project properties -> Build Customizations...) the following translation of snemarch's code to MASM might be useful:

    .model flat
    
    .data
    __imp__EncodePointer@4 dd dummy
    __imp__DecodePointer@4 dd dummy
    EXTERNDEF __imp__EncodePointer@4 : DWORD
    EXTERNDEF __imp__DecodePointer@4 : DWORD
    
    .code
    dummy proc
    mov eax, [esp+4]
    ret 4
    dummy endp
    
    end
    

    And remember to set Linker->System->Minimum Required Version to 5.0 (default is 5.1) to run on Windows 2000.

提交回复
热议问题