本文介绍了MASM编译错误:初始化程序的大小对于指定的大小而言太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在尝试构建一个64位静态C库中包含的程序集文件,它与64位C运行时库动态链接。 该库是64位的,这是我认为问题的一部分。 这是程序集的顶部: JMEMDOSA_TXT   段字节公共'CODE'    假设cs:JMEMDOSA_TXT     public _jdos_open public _jdos_close public _jdos_seek ... 这是我得到的错误: A2071:初始化程序数量对于指定大小而言太大。错误在第一行引用段的地方,我相信它正在尝试加载64位C运行时库。 是否有人熟悉汇编和MASM谁可以指出我正确的方向如何解决这个问题? 以下是完整源文件的链接: https: //github.com/cloudflare/jpegtran/blob/master/jmemdosa.asm 解决方案 在这种情况下,我认为程序集的概念是不相关的。我已经做了20年的Windows编程,我不记得.Net之前用于Windows可执行文件的术语。 我不明白MASM是如何相关的。您需要解释它是如何相关的,除非您尝试使用C编译器的MASM输出来解决C的问题,那么您需要提供有关C的更多信息并省略MASM。 I'm trying to build an assembly file which is included in a 64-bit Static C library which dynamically links with the 64-bit C Runtime Libraries.  The library is 64-bit which is part of where I believe the issue is.Here's the top part of the assembly:JMEMDOSA_TXT    segment byte public 'CODE'    assume cs:JMEMDOSA_TXT      public _jdos_open public _jdos_close public _jdos_seek...Here's the error I get:A2071: initializer magnitude too large for specified size.The error is on the first line where the segment is referenced where I believe it is trying to load the 64-bit C runtime library.Is anyone familiar with assembly and MASM who could point me in the right direction on how to fix this to compile?Here is a link to the full source file:https://github.com/cloudflare/jpegtran/blob/master/jmemdosa.asm 解决方案 In this context I think the concept of assemblies is not relevant. I have been doing Windows programming for 20 years and I don't remember the term being used for Windows executables before .Net.I don't understand how MASM is relevant. You need to explain how it is relevant, except if you are trying to solve a problem with C using the MASM output of the C compiler then you need to provide more information about the C and omit the MASM. 这篇关于MASM编译错误:初始化程序的大小对于指定的大小而言太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-04 12:10