Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 什么Visual Studio链接器设置以someFunction=_someFunction格式生成导出名称(键为“=”)_Visual Studio_Visual Studio 2012_Linker_Visual C++ 6 - Fatal编程技术网

Visual studio 什么Visual Studio链接器设置以someFunction=_someFunction格式生成导出名称(键为“=”)

Visual studio 什么Visual Studio链接器设置以someFunction=_someFunction格式生成导出名称(键为“=”),visual-studio,visual-studio-2012,linker,visual-c++-6,Visual Studio,Visual Studio 2012,Linker,Visual C++ 6,我正在使用VisualStudio2012从源代码构建zlib。注意,我没有在这里标记zlib,只是因为我不认为这个问题特定于任何给定的项目 生成成功,但使用dumpbin/EXPORTS时,输出如下所示: C:\Source\zlib>dumpbin /EXPORTS ./zlib1.dll Microsoft (R) COFF/PE Dumper Version 11.00.61232.400 Copyright (C) Microsoft Corporation. All righ

我正在使用VisualStudio2012从源代码构建zlib。注意,我没有在这里标记zlib,只是因为我不认为这个问题特定于任何给定的项目

生成成功,但使用dumpbin/EXPORTS时,输出如下所示:

C:\Source\zlib>dumpbin /EXPORTS ./zlib1.dll
Microsoft (R) COFF/PE Dumper Version 11.00.61232.400
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file ./zlib1.dll

File Type: DLL

  Section contains the following exports for zlib1.dll

    00000000 characteristics
    5DD6A00D time date stamp Thu Nov 21 08:32:45 2019
        0.00 version
           1 ordinal base
         165 number of functions
         119 number of names

    ordinal hint RVA      name

          1    1 00001000 adler32
        140    2 00001340 adler32_combine
          2    3 00001410 compress
         39    4 00001360 compress2
         46    5 00001430 compressBound
但是,当我检查其他人构建的版本(使用VC6-不确定这是否重要)时,输出如下所示:

C:\Source\zlib-1.2.7-win32>dumpbin /EXPORTS ./zlib1.dll
Microsoft (R) COFF/PE Dumper Version 11.00.61232.400
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file ./zlib1.dll

File Type: DLL

  Section contains the following exports for zlib1.dll

    00000000 characteristics
    509EFCCB time date stamp Sat Nov 10 19:18:03 2012
        0.00 version
           1 ordinal base
          76 number of functions
          76 number of names

    ordinal hint RVA      name

          1    0 00001000 adler32 = _adler32
          2    1 00001270 adler32_combine = _adler32_combine
          3    2 00001340 adler32_combine64 = _adler32_combine64
          4    3 00001400 compress = _compress
          5    4 00001360 compress2 = _compress2
          6    5 00001420 compressBound = _compressBound
查找更改此输出类型的visual studio设置时遇到问题。接下来,我尝试将.def文件从

LIBRARY
; zlib data compression and ZIP file I/O library

VERSION     1.2

EXPORTS
        adler32                                   @1

但这似乎只是重命名导出,而不是获得:

ordinal hint RVA      name

      1    0 00001000 adler32 = _adler32
我得到:

ordinal hint RVA      name

      1    0 00001000 _adler32
如果在.def文件中切换它们,则项目无法正确构建/链接(有意义)


因此,在更新的(比VC6更高的)版本的VS中是否有以somefunc=\u somefunc格式提供/导出的设置?

根据这个答案(),他们必须使用
Generate Debug Info=Yes

完美。谢谢我一直在寻找这个答案(即使在这里),但不知道该用什么术语。
ordinal hint RVA      name

      1    0 00001000 _adler32