1.安装编译工具

安装MSVC152路径C:/MSVC;

安装MASM611可以自己指定E:/MASM611;

命令行编译

相关文件配置

修改setupen2.bat 如下:

:PATH_DONE

set PATH=%__MSVCDIR%/bin;%PATH%;%_WINCEROOT%/sdk/bin/i386;E:/MASM611/BIN

set MSDevDir=%__MSVCDIR%

set LIB=%__MSVCDIR%/lib

set INCLUDE=%__MSVCDIR%/include

goto DONE

把bootarg.h拷贝到C:/WINCE600/PLATFORM/CEPC/SRC/BOOTLOADER/DOS/LOADCEPC该文件在C:/WINCE600/PLATFORM/COMMON/SRC/SOC/X86_MS_V1/INC

分别把ethmain.c,video.c里面的#include<../../inc/bootarg.h>改成#include<bootarg.h>

相关命令

>CD C:/WINCE600/PLATFORM/CEPC/SRC/BOOTLOADER/DOS/LOADCEPC

>SET _WINCEROOT=C:/WINCE600

>SETUPENV

结果显示

*** 16-bit dev mode - type exit to return to normal ***

>PATH

PATH=C:/msvc/bin;e:/MWOS/DOS/BIN;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/Program Files/Microsoft SQL Server/80/Tools/BINN;C:/Program Files/Microsoft SQL Server/90/Tools/binn/;E:/PROGRA~1/Borland/Delphi6/Bin;E:/PROGRA~1/Borland/Delphi6/Projects/Bpl;C:/Program Files/StormII/Codec;C:/Program Files/Storm

II;;C:/WINCE600/sdk/bin/i386;E:/MASM611/BIN

这里一定要存在PATH=C:/msvc/bin;E:/MASM611/BIN;C:/WINCE600/sdk/bin/i386;这个3个路径是编译LOADCEPC的关键。

*** 16-bit dev mode - type exit to return to normal ***

>nmake /F loadcepc.mak

显示结果

Microsoft (R) Program Maintenance Utility   Version 1.40

Copyright (c) Microsoft Corp 1988-93. All rights reserved.

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c MAIN.C

main.c

main.c(1) : warning C4001: nonstandard extension 'single line comment' was used

main.c(1430) : warning C4135: conversion between different integral types

main.c(629) : warning C4704: 'usage' : in-line assembler precludes global optimi

zations

main.c(838) : warning C4704: 'LoadImage' : in-line assembler precludes global op

timizations

main.c(1146) : warning C4769: conversion of near pointer to long integer

main.c(1304) : warning C4704: 'GetPCIConfigMechanism' : in-line assembler preclu

des global optimizations

main.c(1456) : warning C4701: local variable 'ver_hi' may be used without having

been initialized

main.c(1456) : warning C4701: local variable 'ver_lo' may be used without having

been initialized

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c XMSAPI.C

xmsapi.c

xmsapi.c(1) : warning C4001: nonstandard extension 'single line comment' was use

d

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c VIDEO.C

video.c

video.c(1) : warning C4001: nonstandard extension 'single line comment' was used

video.c(47) : warning C4704: 'mode320x200x256' : in-line assembler precludes glo

bal optimizations

video.c(60) : warning C4704: 'isVesaSupported' : in-line assembler precludes glo

bal optimizations

video.c(81) : warning C4704: 'setVesaMode' : in-line assembler precludes global

optimizations

video.c(211) : warning C4704: 'FindClosestVESAMode' : in-line assembler preclude

s global optimizations

video.c(351) : warning C4704: 'FindVESAMode' : in-line assembler precludes globa

l optimizations

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c MDPPFS.C

mdppfs.c

mdppfs.c(1) : warning C4001: nonstandard extension 'single line comment' was use

d

mdppfs.c(111) : warning C4135: conversion between different integral types

mdppfs.c(152) : warning C4135: conversion between different integral types

mdppfs.c(175) : warning C4135: conversion between different integral types

mdppfs.c(186) : warning C4135: conversion between different integral types

mdppfs.c(235) : warning C4135: conversion between different integral types

mdppfs.c(105) : warning C4701: local variable 'usStatus' may be used without hav

ing been initialized

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c DEBUG.C

debug.c

debug.c(1) : warning C4001: nonstandard extension 'single line comment' was used

debug.c(34) : warning C4135: conversion between different integral types

debug.c(95) : warning C4135: conversion between different integral types

debug.c(103) : warning C4101: 'ucArgs' : unreferenced local variable

debug.c(137) : warning C4127: conditional expression is constant

debug.c(95) : warning C4761: integral size mismatch in argument; conversion supp

lied

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c PPFS.C

ppfs.c

ppfs.c(1) : warning C4001: nonstandard extension 'single line comment' was used

ppfs.c(175) : warning C4057: 'argument' : indirection to slightly different base

types

ppfs.c(221) : warning C4057: 'argument' : indirection to slightly different base

types

ppfs.c(292) : warning C4057: 'argument' : indirection to slightly different base

types

ppfs.c(307) : warning C4115: '_finddata_t' : named type definition in parenthese

s

ppfs.c(323) : warning C4057: 'argument' : indirection to slightly different base

types

ppfs.c(376) : warning C4057: 'argument' : indirection to slightly different base

types

ppfs.c(421) : warning C4057: 'argument' : indirection to slightly different base

types

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c PPFSTOOL.C

ppfstool.c

ppfstool.c(1) : warning C4001: nonstandard extension 'single line comment' was u

sed

ppfs.h(25) : warning C4115: '_finddata_t' : named type definition in parentheses

ppfstool.c(452) : warning C4210: nonstandard extension used : function given fil

e scope

ppfstool.c(467) : warning C4135: conversion between different integral types

ppfstool.c(540) : warning C4135: conversion between different integral types

ppfstool.c(215) : warning C4769: conversion of near pointer to long integer

cl /I . /nologo /Gs /G2 /W4 /Z7 /Ox /D "NDEBUG" /D "_DOS" /D "CEDDK_USED

DKMACRO" /Fc /FR /I ../../INC  /c ETHMAIN.C

ethmain.c

ethmain.c(1) : warning C4001: nonstandard extension 'single line comment' was us

ed

ethmain.c(140) : warning C4057: '=' : indirection to slightly different base typ

es

ethmain.c(162) : warning C4057: 'argument' : indirection to slightly different b

ase types

ethmain.c(162) : warning C4057: 'argument' : indirection to slightly different b

ase types

ethmain.c(270) : warning C4769: conversion of near pointer to long integer

ml /c TRANSFER.ASM

Microsoft (R) Macro Assembler Version 6.11

Copyright (C) Microsoft Corp 1981-1993.  All rights reserved.

Assembling: TRANSFER.ASM

echo >NUL @LOADCEPC.CRF

link /NOLOGO /NOI /STACK:5120 /ONERROR:NOEXE /CO /MAP /LINE @LOADCEPC.CR

F

Object Modules [.obj]: /NOLOGO /NOI /STACK:5120 /ONERROR:NOEXE /CO /MAP /LINE MA

IN.OBJ +

Object Modules [.obj]: XMSAPI.OBJ +

Object Modules [.obj]: VIDEO.OBJ +

Object Modules [.obj]: MDPPFS.OBJ +

Object Modules [.obj]: PPFS.OBJ +

Object Modules [.obj]: PPFSTOOL.OBJ +

Object Modules [.obj]: ETHMAIN.OBJ +

Object Modules [.obj]: DEBUG.OBJ +

Object Modules [.obj]: TRANSFER.OBJ

Run File [MAIN.exe]: LOADCEPC.EXE

List File [c:LOADCEPC.map]: nul

Libraries [.lib]: slibce  oldnames

Definitions File [nul.def]: ;

bscmake @C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/nm002092.

Microsoft Browser Database Maintenance Utility Version 2.51

Copyright (c) Microsoft Corp 1990-1993. All rights reserved.

3VC++ 152编译

修改loadcepc.mak,这是一个工程文件,由MSVC1.52来执行.添加环境变量即可。

#

#

# Microsoft Visual C++ generated build script - Do not modify

path=C:\MSVC\BIN;E:\MASM611\BIN

PROJ = LOADCEPC

DEBUG = 0

PROGTYPE = 6

CALLER =

ARGS =

DLLS =

D_RCDEFINES = -d_DEBUG

R_RCDEFINES = -dNDEBUG

ORIGIN = MSVC

如代码中红色提示部分。

运行MSVC1.52, Project->Open中选择loadcepc.mak文件,并确定

点Project->Build LOADCEPC.EXE, 在loadcepc目录下产生了一个新的loadcepc.exe.

编译工具及方法资源下载地址

http://download.csdn.net/detail/blaider/5723491

编译LOADCEPC.EXE程序的更多相关文章

  1. Borland C++ Builder 编译绿色Exe程序

    按照“打开Project/Option 翻到Packages页,去掉Build with runtime packages前面的勾. http://www.jinyuanbao.cn翻到Linker页 ...

  2. 【转】VS2012编译出来的程序,在XP上运行,出现“.exe 不是有效的 win32 应用程序” “not a valid win32 application”

    原文网址:http://www.cnblogs.com/Dageking/archive/2013/05/15/3079394.html VS2012编译出来的程序,在XP上运行,出现“.exe 不是 ...

  3. 用python写个简单的小程序,编译成exe跑在win10上

    每天的工作其实很无聊,早知道应该去IT公司闯荡的.最近的工作内容是每逢一个整点,从早7点到晚11点,去查一次客流数据,整理到表格中,上交给素未蒙面的上线,由他呈交领导查阅. 人的精力毕竟是有限的,所以 ...

  4. 反编译.net下的exe程序

    1. 什么叫.net平台 .NET框架是一个多语言组件开发和执行环境,它提供了一个跨语言的统一编程环境..NET框架的目的是便于开发人员更容易地建立Web应用程序和Web服务,使得Internet上的 ...

  5. 对用pyinstaller打包的exe程序进行反编译,获得源码

    参考文章: 1.https://www.cnblogs.com/DirWang/p/12018949.html#PyInstallerExtractor 2.https://msd.misuland. ...

  6. 调用Visual Studio的cl.exe编译C/C++程序

    @ 目录 调用Visual Studio的cl.exe编译C/C++程序 前言 1.查看VS的路径 2.添加环境变量 3.查看设置是否生效 4.配置Notepad++ 调用Visual Studio的 ...

  7. aardio + .NET 快速开发独立 EXE 程序,可防 ILSpy 反编译

    简介 aardio 可以非常方便地调用 .NET( 不需要任何复杂的步骤 ). .NET 在 aardio 中很好用,系统自带 .NET 组件以及各种开源 .NET 组件在 aardio 用户中也很受 ...

  8. windows下调用外部exe程序 SHELLEXECUTEINFO

    本文主要介绍两种在windows下调用外部exe程序的方法: 1.使用SHELLEXECUTEINFO 和 ShellExecuteEx SHELLEXECUTEINFO 结构体的定义如下: type ...

  9. VS2010 win7 QT4.8.0,实现VS2010编译调试Qt程序,QtCreator静态发布程序

    下载源代码,注意一定是源码压缩包如qt-everywhere-opensource-src-4.8.0.zip, 不是Qt发布的已编译的不同版本的标准库如qt-win-opensource-4.8.0 ...

随机推荐

  1. 我的接口框架---框架函数文件common.php

    <?php defined('JDHU') OR die('no allow access'); /** * 加载配置文件 */ function &get_config($replac ...

  2. C#反射(二) 【转】

    如果没有看<C#反射(一)>.建议先看<C#反射(一)>再看这一篇.上一篇文章发表,有人评论我所写的东西比较基础.其实我也知道我也只不过是在写最基础的语法而已,之所以写它是因为 ...

  3. BZOJ 4011 开店

    Description 风见幽香有一个好朋友叫八云紫,她们经常一起看星星看月亮从诗词歌赋谈到人生哲学.最近她们灵机一动,打算在幻想乡开一家小店来做生意赚点钱.这样的想法当然非常好啦,但是她们也发现她们 ...

  4. QT获得所有系统环境变量(包括Linux和MAC的信息)

    系统环境变量还是挺重要的,除了QStandardPaths(感觉都是文档类型的变量,QT4使用QDesktopServices),更有QProcessEnvironment(都是真正的系统变量): Q ...

  5. Android中的音频处理------SoundPool,MediaRecorder,MediaPlayer以及RingStone总结

    用Soundpool可以播一些短的反应速度要求高的声音, 比如游戏中的爆破声, 而Mediaplayer适合播放长点的. MediaRecorder主要用来录音. SoundPool载入音乐文件使用了 ...

  6. AlarmManager.setRepeating将不再准确

    背景: 当我们想让Android应用程序定时为做一件工作时,我们往往会在一个BroadcastReceiver中使用AlarmManager.setRepeating()方法来实现.在API 19(即 ...

  7. android 上传图片到服务器Tomcat(Struts2)

    在做android开发的时候,有时你会用到图片的上传功能,在我的android项目中,我是选中图片,点击上传多张图片 android客户端上传图片部分的代码如下: package com.exampl ...

  8. SQL*Net message from client

    SQL*Net message from client The server process (foreground process) waits for a message from the cli ...

  9. squid透明代理+iptables防火墙,多网卡详细配置

    squid透明代理+iptables防火墙详细配置 看到很多人都在不停地问iptables+squid做透明代理的问题,鄙人不才,斗胆在此做统一解答.如有任何纰漏还望各位批评指教. ========= ...

  10. GCC 命令行详解 -L 指定库的路径 -l 指定需连接的库名(转载)

    转载自:http://www.cnblogs.com/cy163/archive/2009/03/12/1409434.html 1.gcc包含的c/c++编译器gcc,cc,c++,g++,gcc和 ...