WinCE平台的程序编译到Win32平台下运行

Lazarus实战开发之数据库SQLite(WIN32/WINCE) 阅读详情

最近做的项目中,有一个在WinCE平台上跑的程序,后来随着项目的发展,要求此程序在PC上也能跑。
感谢VS 2005提供的多平台支持,只需要几分钟就可以解决这个问题,方法很简单,下面是我处理的过程。

 

1.在配置管理中增加新平台

 

1.1 创建新平台


程序最初是基于Pocket PC 2003(ARMV4)平台创建的,我在此平台的配置基础上,创建新的Win32平台。
打开菜单Build->Configuration Manager,在Active Solution Platform下拉选择框中选择New,选择new platform为Win32,Copy settings from选择原有配置Pocket PC 2003(ARMV4),按OK为应用程序创建新的Win32运行平台。

 

 

1.2 修改Debug|Win32的配置

Win32平台的配置由PPC复制而来,有些参数需要进行更改。可以在项目属性中进行修改,但直接修改工程文件可能更为直观和简单,我是直接修改此文件。

 

1.2.1 修改工具VCMIDLTool中的预定义宏PreprocessorDefinitions,只保留"_DEBUG"
1.2.2 修改工具VCMIDLTool中的预定义宏PreprocessorDefinitions,改为"_DEBUG;WIN32;_WINDOWS"
1.2.3 修改工具VCResourceCompilerTool中的预定义宏PreprocessorDefinitions,只保留"_DEBUG"
1.2.4 修改工具VCLinkerTool的配置,改为

 

1.3 修改Release|Win32的配置

 

1.3.1 修改工具VCMIDLTool中的预定义宏PreprocessorDefinitions,只保留"NDEBUG"
1.3.2 修改工具VCMIDLTool中的预定义宏PreprocessorDefinitions,改为"NDEBUG;WIN32;_WINDOWS"
1.3.3 修改工具VCResourceCompilerTool中的预定义宏PreprocessorDefinitions,只保留"NDEBUG"
1.3.4 修改工具VCLinkerTool的配置,改为

 

2. 修正平台差异带来的编译错误

 

2.1 stdafx.h

 

首先是WINVER的定义,WinCE下被定义为_WIN32_WCE,改之:


然后是一些WinCE特有的头文件和库,改为仅当WINCE宏被定义时编译(可能分散在不同位置):


2.2 App类

 

在xxxApp::InitInstance中,SHInitExtraControls()的调用加上宏检测,仅当WINCE宏被定义时编译。

另外App类的头文件中包含了资源文件的定义,但被#ifdef POCKETPC2003_UI_MODEL宏包了起来,我的程序在两个平台都使用同样的资源,因此把这个宏注释掉即可。

 

wince 下操作ini配置文件 开发平台vs2008. 经过自己的测试,调通了一个wince下可以操作ini配置的源码。 这个问题困扰自己好几天,网上很多资源都是有问题,或者代码没有经过测试。 所有好资源不敢独享,如有这方面困扰的人员,可以下载使用 立即下载

相关推荐

WinCE读取配置文件

WinCE下读取配置文件的类,WinCE5.0下测试通过。

wince XML文件 读取 XmlTextReader

<br /> public static string XmlReader(string strName)<br />        {<br />            string strValue = "";<br />            string typeName = "";<br />            FileStream myfile = new FileStream(getFilePath("Config.xml"), FileMode.Open);<br />         

ilovecx的专栏 1903

Axial Attention 和 Criss-Cross Attention及其代码实现

Axial Attention 和 Criss-Cross Attention及其代码实现 ​ 文章目录Axial Attention 和 Criss-Cross Attention及其代码实现1 Criss - Cross Attention介绍1.1 引言1.2 理论实现1.2.1 获取权重A1.2.2 Affinity操作1.3.3 全部信息获取1.3 代码实现1.3.1 官方实现1.3.2 纯pytorch实现2 Axial Attention 介绍2.1 引言2.2 理论实现2.3 代码实现2.3

fzl的博客 2万+

WINCE C#读写INI文件

最近开发一个CE上的GPS程序,用到配置存储,由于数据比较少且数据结构简单,所以采用了INI格式,WINCE没有提供windows里读写ini的函数,就自己写了一个,代码如下(C#):     //////////////////////////////////////////////////////////////////////////    //ini文件的C#读写    //钟磊

8621

从零开始学习信号完整性(SIPI)--2

上一节我们已经谈过,信号完整性研究的是如何使驱动器输出的信号传输到接收器件并被正确的接收。 信号完整性的三要素包含了:信号、驱动接收芯片、传输通道。 这其中信号是主体,我们要做的主要工作就是设计好信号的传输路径为信号的正确传输扫清障碍。要做信号完整性分析与设计首先要了解信号的特性,以及信号质量的判别标准。 对一个信号进行描述通常需要如下几个指标: 信号特性的描述 摆幅:信号从低电平到高电平之间的电压差,对于单端信号通常由信号的供电电压决......

qq_29476769的博客 2万+

深度学习之Pytorch---本人踩过的坑(报错总结)第十篇

深度学习之Pytorch安装时遇到的问题—本人踩过的坑(报错总结) 报错一:pip install torchvision 出现“由于目标计算机积极拒绝,无法连接”的问题 解决方案:找到自己浏览器的工具或选项,我的是火狐,具体解决方案如下图 然后找到桌面左下角,点击搜索internet,然后点击internet选项 最后回到Anaconda Prompt命令行输入pip install...

qq_41570307的博客 1921

C#WinCE程序(.NET Compact Framework 3.5)项目重构面向抽象设计

重构关注点 遵循开闭原则 面向抽象设计 实现设备程序端可动态配置 重构的需求 领导想省事提出需求,将现有PDA程序修改为支持PC端由电器工程师根据实际的生产流程可配置,PDA程序在读取配置文件后动态生成导航界面。然后导航绑定的是PDA程序Dll里的界面。公司的综合赋码管理系统(CMS)作为服务器端对PDA暴露WCF服务,PDA在执行扫描操作后对CMS发起请求,CMS收到请求后...

weixin_34209851的博客 304

Gitlab+Jenkins+Docker+Harbor+K8s+Rancher集群搭建CICD平台

本文以诺依项目为例详细记录了Kubernetes集群的部署过程以及配套DevOps环境的搭建。主要内容包括:1) 配置8个节点的软硬件环境;2) 基础环境准备(网络、防火墙、Docker等);3) 三节点Kubernetes集群部署;4) GitLab代码仓库安装;5) Harbor私有镜像仓库搭建;6) Jenkins持续集成工具配置;7) 基于若依项目的CI/CD实践;8) Rancher集群管理工具部署。

hickman2023的博客 1222

Windows (wince、 wind…

Windows (wince、 windows mobile、windows phone)错误代码大全 DWORD ErrorNum = GetLastError();   〖0〗-操作成功完成。  〖1〗-功能错误。  〖2〗-系统找不到指定的文件。  〖3〗-系统找不到指定的路径。  〖4〗-系统无法打开文件。  〖5〗-拒绝访问。  〖6〗-句柄无效。  〖7〗-存储控制块被损坏。

无语僧 2235

unity人物刚体移动_Unity3D实现2D人物移动-总结篇

背景最近研究Unity3d,2d寻路的实现。所以又一次涉及到了角色坐标位移的问题。系统的对于角色鼠标点击移动这个简单问题进行整理和总结。本来就是一个简单的几何问题,结果发现已经有两个小坑,顺便填上,这里做下总结。实现需求:通过鼠标点击,控制2d角色移动,就是点哪里,角色向移动到哪里问题分解:按照时间进行动画分解,鼠标输入(动画开始)、平移(动画进行)、移动结束(动画结束)前提:这里前面的文章基本解...

weixin_39610366的博客 1279

AgentScope Java 2.0 项目实战: 从零构建自己的个人AI助手“小龙虾“

本文系统介绍如何基于Spring Boot WebFlux、React 18和TypeScript,从零搭建一个本地化的个人AI助手管理平台——AgentScope Paw。项目支持多Agent创建与管理、SSE流式对话、工作区文件CRUD、技能市场、子智能体孵化、AI辅助起草Agent配置等核心功能,并深度集成钉钉、企业微信、飞书、GitHub等IM通道。

program哲学 1458

[转载]WinCE平台的程序编译到Win32平台下运行

原文地址:WinCE平台的程序编译到Win32平台下运行作者:麦田怪圈      最近做的项目中,有一个在WinCE平台上跑的程序,后来随着项目的发展,要求此程序在PC上也能跑。 感谢VS 2005提供的多平台支持,只需要几分钟就可以解决这个问题,方法很简单,下面是我处理的过程。 1.在配置管理中增加新平台 1.1 创建新平台 程序最初是基于Pocket PC 2003(ARMV4)平台...

人生几何的博客 608

把 SAP Fiori Launchpad 配置文件放进 MIME Repository:从上传、缓存控制到可访问路径的完整实践

文章摘要: 在 SAP Fiori 项目中,Launchpad 配置文件的部署是关键挑战,核心在于通过 MIME Repository 而非直接修改标准文件来实现稳定配置。与 BSP Repository 相比,MIME Repository 支持显式设置客户端缓存时间(如 SAP 推荐的 7 天),适合生产环境治理。配置文件需为 JSON 格式,部署时需确保路径可访问(通过 ICF node 和 external alias),并注意语法错误会导致静默失效。实操步骤包括:在 SE80 中创建专用目录、设置

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 101

[转载]WinCE平台的程序编译到Win32平台下运行_人生几何_新浪博客

原文地址:WinCE平台的程序编译到Win32平台下运行作者:麦田怪圈 最近做的项目中,有一个在WinCE平台上跑的程序,后来随着项目的发展,要求此程序在PC上也能跑。 感谢VS 2005提供的多平台支持,只需要几分钟就可以解决这个问题,方法很简单,下面是我处理的过程。 1.在配置管理中增加新平台 1.1 创建新平台 程序最初是基于Pocket PC 2003(ARMV4)平台...

人生几何的博客 195

【DaVinci Developer专题】-23-IDT高阶应用:结构体类型的数组

共8页 目录 1 创建一个Record IDT 2 创建一个Array IDT 3 创建一个S/R Port Interface 4 创建一个Constant 5 导入CFG生成代码的总结 6 结尾 <--返回「实战篇」博文-总目录--> <--返回「Autosar从入门到精通-实战篇」专栏主页--> 关键字: 缩略语/术语 含义 DEV DaVinci Developer .

「汽车电子助手」的博客 1675

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

工作积累之WinCE平台的程序编译到Win32平台下运行

在配置管理中增加新平台   1.1 创建新平台   程序最初是基于Pocket PC 2003(ARMV4)平台创建的,我在此平台的配置基础上,创建新的Win32平台。 打开菜单Build->Configuration Manager,在Active Solution Platform下拉选择框中选择New,选择new platform为Win32,Copy settings from选

startwithdp的专栏 1227

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

使用lazarus和KOLCE开发Windows Mobile下使用的程序

本文讲述了使用KOLCE如何开发Windows Mobile下的程序。一、安装,配置环境由于要开发Windows Mobile的程序,因此必须安装lazarus下的WinCE编译器。如果想要编译出来的程序体积小,需要安装KolCE。下面讲一下KolCE的安装方法。首先打开MirrorKOLPackage.lpk,然后点击Compile,使控件编译并生成.o和.ppu文件,编译通过后,点击Insta

512

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

WinCE开发的一般问题

 以下文章摘自“雷神”整理的文档问:Microsoft® eMbedded Visual Tools 3.0到底是什么? 答:eMbedded Visual Tools 3.0是一套供嵌入式开发商在Microsoft Windows® CE操作系统上面向新一代32位设备编写软件应用程序的相关工具。该产品提供了Microsoft eMbedded Visual C++® 3.0开发系统完全版、Mic

aikker的专栏 2955

\t\t使用lazarus和KOLCE开发Windows Mobile下使用的程序

本文讲述了使用KOLCE如何开发Windows Mobile下的程序。一、安装,配置环境由于要开发Windows Mobile的程序,因此必须安装lazarus下的WinCE编译器。如果想要编译出来的程序体积小,需要安装KolCE。下面讲一下KolCE的安装方法。首先打开MirrorKOLPackage.lpk,然后点击Compile,使控件编译并生成.o和.ppu文件,编译通过后,点击Insta

339

在Windows Mobile和Wince(Windows Embedded CE)下进行Win32开发,取出当前所有运行中进程信息的方法...

寇平 同学问我使用Native C++开发时如何在取出进程下窗口的句柄,因为取进程下窗口句柄需要用到进程信息,我先总结出如何取出当前所有运行进程信息的方法。 1.引用Tlhelp32.h文件 #include "Tlhelp32.h" 因为需要用到CreateToolhelp32Snapshot,Process32First和Process32Next...

weixin_33890499的博客 169

SQLite3源码在Windows及WinCE平台下的编译方法

好久没有写博客了,最近有时间又开始写点东西。 最近,刚好需要用到SQLite3数据库,就自己研究了一下,这个的确是个好东西,开源的东西都还不错。 好了,言归正传。相信不少人在用SQLite3源码编译的时候还是费了不少劲的,网上找来的东西都讲的不是很完整。 下面,我就将自己的编译方法写了出来。 首先从SQLite官方网站http://www.sqlite.org/download....

anbang2014的专栏 216
上一篇: VI常用命令
下一篇: 使用ADS+HJTAG调试Boot Loader
noodies
博客等级 码龄17年 39粉丝 37原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值