2011-12-07 101 views
3

我正在爲使用運行Windows Embedded Compact 7的NVIDIA Tegra 2的嵌入式設備進行編程。我的開發環境是Microsoft Visual Studio 2008. boost庫和尤其是boost-asio包似乎對我的需求非常有幫助。不幸的是,我無法找到關於如何在Windows Embedded Compact 7上運行的良好指南。我優先獲得.lib文件,我可以靜態鏈接到我的應用程序中。爲Windows Embedded Compact 7編譯boost庫

回答

7

看來這個過程的文檔是稀疏的,因爲它需要對構建過程進行非平凡的更新才能使用Windows CE。這個問題最全面的教程似乎是here

由於您明確標記了這個boost-asio,我還專門研究了Boost的該組件。 Here's a thread from the Boost mailing list覆蓋這個庫中的細節,其中包括潛在的故障情況下,你可能會遇到,JAM file modifications,a batch file to help you with the build *

對於那些閱讀本:分享您的經驗,一旦你得到這個工作。儘管Boost is too memory-heavy for embedded applications, Boost提供了使用單獨軟件包來滿足您的需求的能力。我希望在SO上的其他用戶將會對你的經驗感興趣,對你的工作感興趣。


  *由於人們已經表達與引用的批處理文件消失時Nabble鏈接失效的問題,這裏是爲後人一個pastedump:

@SET VCINSTALLDIR=%VS9INSTALLDIR%\VC 
@if "%VS9INSTALLDIR%"=="" goto error_no_VSINSTALLDIR 
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR 

@echo Setting environment for using Microsoft Visual Studio 2008 tools for WM5. 
@set TARGETCPU=X86 

@call :GetWindowsSdkDir 

@if not "%WindowsSdkDir%" == "" ( 
     set "PATH=%WindowsSdkDir%bin;%PATH%" 
) 

@rem 
@rem Root of Visual Studio IDE installed files. 
@rem 
@set DevEnvDir=%VS9INSTALLDIR%\Common7\IDE 

@set PATH=%VCINSTALLDIR%\CE\bin\x86_arm;%VCINSTALLDIR%\bin;%VS9INSTALLDIR%\Common7\Tools;%DevEnvDir%;%VS9INSTALLDIR%\Common\Tools;%VS9INSTALLDIR%\Common\IDE;%VS9INSTALLDIR%;%PATH% 
@set INCLUDE=%STLPORT_PATH%\STLPort-5.2.1\stlport;%VCINSTALLDIR%\ce\include;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\include\ARMV4I;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\include;%VCINSTALLDIR%\ce\atlmfc\include 
@set LIB=%STLPORT_PATH%\STLPort-5.2.1\lib\evc9-arm;%CETOOLS%\Windows Mobile 5.0 Pocket PC SDK\lib\ARMV4I;%VCINSTALLDIR%\ce\ATLMFC\LIB\ARMV4I;%VCINSTALLDIR%\ce\LIB\ARMV4I 
@set LIBPATH= 

@goto end 

:GetWindowsSdkDir 
@call :GetWindowsSdkDirHelper HKLM > nul 2>&1 
@if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1 
@if errorlevel 1 set WindowsSdkDir=%VCINSTALLDIR%\PlatformSDK\ 
@exit /B 0 

:GetWindowsSdkDirHelper 
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') DO ( 
     if "%%i"=="CurrentInstallFolder" ( 
       SET "WindowsSdkDir=%%k" 
     ) 
) 
@if "%WindowsSdkDir%"=="" exit /B 1 
@exit /B 0 


:error_no_VSINSTALLDIR 
@echo ERROR: VS9INSTALLDIR variable is not set. 
@goto end 

:error_no_VCINSTALLDIR 
@echo ERROR: VCINSTALLDIR variable is not set. 
@goto end 

:end 

@SET VCINSTALLDIR=%VS9INSTALLDIR%\VC 
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework 
@SET FrameworkVersion=v2.0.50727 
@SET Framework35Version=v3.5 
@if "%VS9INSTALLDIR%"=="" goto error_no_VSINSTALLDIR 
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR 

@echo Setting environment for using Microsoft Visual Studio 2008 x86 tools with STLport-5.2.1. 

@call :GetWindowsSdkDir 

@if not "%WindowsSdkDir%" == "" ( 
     set "PATH=%WindowsSdkDir%bin;%PATH%" 
     set "INCLUDE=%WindowsSdkDir%include;%INCLUDE%" 
     set "LIB=%WindowsSdkDir%lib;%LIB%" 
) 


@rem 
@rem Root of Visual Studio IDE installed files. 
@rem 
@set DevEnvDir=%VS9INSTALLDIR%\Common7\IDE 

@set PATH=%DevEnvDir%;%VCINSTALLDIR%\BIN;%VS9INSTALLDIR%\Common7\Tools;%FrameworkDir%\%Framework35Version%;%FrameworkDir%\%FrameworkVersion%;%VCINSTALLDIR%\VCPackages;%PATH% 
@set INCLUDE=%STLPORT_PATH%\STLport-5.2.1\stlport;%VCINSTALLDIR%\ATLMFC\INCLUDE;%VCINSTALLDIR%\INCLUDE;%INCLUDE% 
@set LIB=%STLPORT_PATH%\STLport-5.2.1\lib\vc9;%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%LIB% 
@set LIBPATH=%FrameworkDir%\%Framework35Version%;%FrameworkDir%\%FrameworkVersion%;%VCINSTALLDIR%\ATLMFC\LIB;%VCINSTALLDIR%\LIB;%LIBPATH% 

@goto end 

:GetWindowsSdkDir 
@call :GetWindowsSdkDirHelper HKLM > nul 2>&1 
@if errorlevel 1 call :GetWindowsSdkDirHelper HKCU > nul 2>&1 
@if errorlevel 1 set WindowsSdkDir=%VCINSTALLDIR%\PlatformSDK\ 
@exit /B 0 

:GetWindowsSdkDirHelper 
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /v "CurrentInstallFolder"') DO ( 
     if "%%i"=="CurrentInstallFolder" ( 
       SET "WindowsSdkDir=%%k" 
     ) 
) 
@if "%WindowsSdkDir%"=="" exit /B 1 
@exit /B 0 

:error_no_VSINSTALLDIR 
@echo ERROR: VSINSTALLDIR variable is not set. 
@goto end 

:error_no_VCINSTALLDIR 
@echo ERROR: VCINSTALLDIR variable is not set. 
@goto end 

:end 
相關問題