文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Setting up the Windows CE cross compiler for linux

Setting up the Windows CE cross compiler for linux

时间:2010-07-02  来源:juexun

CeGCC Install from source:
Heavily influenced by the CeGCC's build tool chain documentaiton.

This guide is to get the unacquainted to get the sources to CeGCC, build and configure to generate ARM compatible Windows CE executables.

1. Get the sources: (Subversion client must be installed):

svn co https://cegcc.svn.sourceforge.net/svnroot/cegcc/trunk/cegcc cegcc

2. Run the build script and grab a coffee or what ever is appropriate:
sudo ./build-cegcc.sh

3. Add the path to your bashrc settings:
export PATH=$PATH:/opt/cegcc/bin

4. Test the install with the following file and command:
test.c:
#include <stdio.h>

int WinMain()
{
    printf("Testing\n");
}

Compile line:

arm-wince-cegcc-gcc -o maintest.exe test.c

The only warning that should appear is:

Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import)

If there are other errors please check the source file, the CeGCC mailing list, the forum on this or Wiki page.

NOTE: The cegcc carries the same syntax as gcc. For example -I for include directories -l for libraries to include.

5. Notes about CeGCC and SyncE: The CeGCC tool set was made to be used with the SynCE toolset. pcp to copy files to the connected PocketPC, and prun to remotely run an executable on the connected PocketPC device.
6. Sample make file (taken from the example make file provided from the sources (doc/examples/Makefile)

ARCH=        arm-wince-pe
CC=        ${ARCH}-gcc ${CFLAGS}
WINDRES=    ${ARCH}-windres

CFLAGS=        -D_WIN32_IE=0x0400 ${VERBOSE} ${INCLUDE}
LDFLAGS=    -Wl,--major-subsystem-version,4,--minor-subsystem-version,20
PDADIR=        ":/storage card/devel"

menu-resource.exe:    menu-resource.o menu-resource.rsc
    ${CC} -o $@ menu-resource.o menu-resource.rsc -lcommctrl ${LDFLAGS}

menu-resource.o:    menu-resource.c
    ${CC} -c $?

menu-resource.rsc:    menu-resource.rc menu-resource.h
    ${WINDRES} menu-resource.rc menu-resource.rsc

clean:
    -rm -f *.o *.exe *.rsc

dist:
    for i in *.exe ; do \
        pcp $$i ${PDADIR}/$$i ; \
    done
排行榜 更多 +
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载
<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

<img preview="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" width="32" height="32" src="http://pic.pdowncc.com/uploadimg/ico/2025/0523/1747993424374100.png" alt="弓箭勇者最新版" />

飞行射击 下载