欢迎来到天天文库
浏览记录
ID:40572960
大小:19.00 KB
页数:3页
时间:2019-08-04
《VS2005,VS2008下使用yasm》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、UsingYasmwithVisualStudio2005andVC++version8(1)Firstlyyouneedtolocatethedirectory(ordirectories)wheretheVC++compilerbinariesarelocatedandputcopiesoftheappropriateyasm.exebinaryinthesedirectories.第一步就是应该把yasm.Exe放进VC的编译目录中。[WindowsYasmexecutablebinariesth
2、atarenotnamedyasm.exewillneedtoberenamedyasm.exeafterbeingplacedintheappropriatedirectories.记得要改名直接就是简单的yasm.exe]Onawin32systemthewin32versionofYasmhastobeused.Onanx64systemeitherthe32orthe64bitversionscanbeusedbuttherulesfileissetuptousethe32bitversion.
3、Thewin32Yasmbinaryshouldbeplacedinthe32-bitVC++binarydirectory,whichistypicallylocatedat:ProgramFiles(x86)MicrosoftVisualStudio8VCbinIfneededthe64-bitYasmbinaryshouldbeplacedinthe64-bittoolsbinarydirectory,whichistypicallyat:ProgramFilesMicrosoftVisu
4、alStudio8VCbin(2)TousethecustomtoolsfacilityinVisualStudio2005,youneedtoplaceacopyoftheyasm.rulesfileintheVisualStudio2005VCprojectdefaultsdirectory,whichistypicallylocatedat:(为了搭载VS2005使用,需要另外添加一个yasm.Rules文件)ProgramFiles(x86)MicrosoftVisualStudio8V
5、CVCProjectDefaultsThisallowsyoutoconfigureYasmasanassemblerwithintheVC++IDE.TouseYasminaproject,rightclickontheprojectintheSolutionExplorerandselectCustomBuildRules...ThiswillgiveyouadialogboxthatallowsyoutoselectYasmasanassembler(notethatyourassemblerf
6、ilesneedtohavetheextension'.asm').ToassembleafilewithYasm,selectthePropertyPageforthefileandtheselectYasmAssemblerintheTooldialogentry.ThenclickApplyandanadditionalpropertypageentrywillappearandenableYasmsettingstobeestablished.Asalternativetoplacingthey
7、asm.rulesfilesasdescribedaboveistosettherulesfilepathintheVisualStudio2005settingsdialogue.ItisalsoimportanttonotethattherulesfilepassesthesymbolsWin32orx64toYasmbyusingtheVisualStudio2005$(PlatformName)macroinordertoobtaineithera32ora64bitassemblermode.
8、ThisisarecentenhancementtoYASMsoyouwillneedtobesurethatyouhaveYasmversion0.5.0orhighertousethisfacility.ALinkerIssueThereappearstobealinkerbugintheVC++v8linkerthatpreventssymbolswithabsoluteaddressesbeinglinkedinDLLbuilds.
此文档下载收益归作者所有