无法识别的链接开关?

aznarble 2001-09-04 11:59:12
程序中需要使用到大于2G内存空间的功能及API函数,结果在编译时加入了/LARGEADDRESSAWARE时VC无法识别这个链接开关(在Project/Setting/Link/General中的Option中加入),请问是何原因?

错误信息:
Linking...
LINK : warning LNK4044: unrecognized option "LARGEADDRESSWARE"; ignored

环境
Windows 2000, Service Pack 2
Visual C++ 6.0, Service Pack 5, Platform SDK 2296.1
...全文
160 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
aznarble 2001-09-06
  • 打赏
  • 举报
回复
气死我了,MSDN中的原文居然会少了一个"A"!! (2001年1月版)

On Intel x86 computers with more than 2 GB and less than 4 GB of memory, the GlobalMemoryStatus function will always return 2 GB in the dwTotalPhys member of the MEMORYSTATUS structure. Similarly, if the total available memory is between 2 and 4 GB, the dwAvailPhys member of the MEMORYSTATUS structure will be rounded down to 2 GB. If the executable is linked using the /LARGEADDRESSWARE linker option, then the GlobalMemoryStatus function will return the correct amount of physical memory in both members.
qqchen79 2001-09-05
  • 打赏
  • 举报
回复
拼错啦!LARGEADDRESSAWARE
*
aznarble 2001-09-05
  • 打赏
  • 举报
回复
哪位知道吗?
加到300分。
aisn 2001-09-05
  • 打赏
  • 举报
回复
我的运行环境是windows me ; vc6.0 sp5
可以build成功!
houjzs 2001-09-05
  • 打赏
  • 举报
回复
use /LARGEADDRESSAWARE
wyzegg 2001-09-05
  • 打赏
  • 举报
回复
MSDN骗人已经不是第一次啦
houjzs 2001-09-05
  • 打赏
  • 举报
回复
Oh I think you should add a "A" between "LARGEADDRESS" and "WARE"
houjzs 2001-09-05
  • 打赏
  • 举报
回复
As far as i know only the win2000 advanced server can run a 3gb user mode program , but in other version it is possible to use this switch, and i test it in my win professional(vc6), and i've not got the linking waring, so the only thing that i can say is making sure your spell is ok.
aznarble 2001-09-05
  • 打赏
  • 举报
回复
Up
zzh 2001-09-04
  • 打赏
  • 举报
回复
是使用那个API函数,检查一下这个API函数要求什么版本的操作系统
aznarble 2001-09-04
  • 打赏
  • 举报
回复
当然有这个编译开关,MSDN原文。

Linker Reference
Home | Overview | How Do I | FAQ | Details

LINK is a 32-bit tool that links Common Object File Format (COFF) object files and libraries to create a 32-bit executable (.EXE) file or dynamic-link library (DLL).

Following is a comprehensive list of options for LINK.EXE. For information on how to specify an option, see Set Linker Options.

This section also includes information on Compiler-Controlled LINK Options, LINK Input Files, and LINK Output.

/LARGEADDRESSAWARE Tells the compiler that the application supports addresses larger than two gigabytes.
tiongkohlang 2001-09-04
  • 打赏
  • 举报
回复
有这个编译开关吗?
我觉得你理解错了。这看上去应该是一个预定义的宏。如果是这样,在你的程序开头加上
#define LARGEADDRESSWARE
或者
#define LARGEADDRESSWARE 1
就可以了。
aznarble 2001-09-04
  • 打赏
  • 举报
回复
与函数无关,在任何一个工程中加入,都无法识别这个开关。

16,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧