使用64位整数无C运行时 - 链接错误__alldiv [英] Using 64 bits integers without C runtime - link error __alldiv
问题描述
我想建立一个Windows控制台应用程序,而无需使用C运行时(MSVCRT或libcmt)。这是只针对KERNEL32.LIB控制台功能从WIN32 API,而不是printf和等。
I am trying to build a windows console application without using the C runtime (msvcrt or libcmt). That is to link just against kernel32.lib and use console functions from WIN32 API instead of printf and such.
我的问题是链接在编译器无法找到__alldiv这似乎来处理32位应用的64位整数分。我想这两个微软的编译器和英特尔的。
My problem is that during link the compiler fails to find __alldiv which seems to handle 64 bit integer divides in 32 bits applications. I tried both Microsoft's compiler and Intel's.
这个功能存在于运行时库。这是很烦人的东西基本为64位整数将需要完整的C运行库。
This function exist in the runtime libraries. It is quite annoying that something as basic as 64 bit integers will require the full C runtime.
任何想法如何解决这个问题?
Any ideas how to overcome the problem?
推荐答案
找到了__alldiv链接问题的解决方案:
Found a solution for the __alldiv link problem:
找到的 lldiv.obj 在MSDEV安装。 我可以在目标文件添加到而不是C运行库的链接。
Found lldiv.obj in msdev installation. I can add that object file to the link instead of the C runtime.
有关我的路径是:
C:\ Program Files文件(x86)的\微软的Visual Studio 9.0 \ VC \ CRT \ SRC \英特尔\ mt_lib \ lldiv.obj
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\crt\src\intel\mt_lib\lldiv.obj.
这篇关于使用64位整数无C运行时 - 链接错误__alldiv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!