2
votes

I am trying to build OpenSSL 1.0.2 version using Visual Studio 2008 command prompt for Windows CE device. I am using Windows 7, 32 bit machine.

I am following the instructions that are mentioned in INSTALL.WCE file.

Below are the steps that I am following:

  1. I have set PATH,LIB and INCLUDE variables.
  2. Run “perl Configure VC-CE”
  3. Run “ms\do_ms”
  4. Run” nmake -f ms\ce.mak”

Below is the error that I am facing

lib /nologo /out:out32_ARMV4I\ssleay32.lib @C:\Users\AppData\Local\Temp\nmBC93.tmp cl/Fotmp32_ARMV4I\constant_time_test.obj -Iinc32 -Itmp32_ARMV4I /O1i /W3 /GF /Gy /nologo -D UNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD - DOPENSSL_SMALL_FOOTPRINT -D_WIN32_WCE=500 -DUNDER_CE=500 -DWCE_PLATFORM_VC-CE -DARM -D_ARM_ -DARMV4I

-QRarch4T -QRinterwork-return /MT -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_ JPAKE -DOPENSSL_NO_DYNAMIC_ENGINE /Zi /Fdtmp32_ARMV4I/app -c .\crypto\constant_time_test.c constant_time_test.c link /nologo /opt:ref /subsystem:windowsce,5.00 /machine:ARM /debug /out:out32_ARMV4I\constant_time_test.exe

C:\Users\AppData\Local\Temp\nmBE87.tmp tmp32_ARMV4I\constant_time_test.obj

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'ARM'

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.EXE"' : return code '0x458' Stop.

As per my understanding this is falling since I am on a x86 machine and trying to build the library for ARM platform. How do I overcome this issue since VS2008 does not have cross-compiler. Can I built this without using wcecomapt library?

1
For Windows CE, I believe you have to install Platform Builder. Or install the Windows SmartPhone and Windows PocketPC SDKs. I believe I provided links to them previously. With the SDKs installed, you will have the "ARM Developer Tools Command Prompt", like you have with X86 and X64.jww
I have already installed SDK's, still can't see "ARM Cross tools command prompt".AnK

1 Answers

1
votes

PATH, LIB and INCLUDE are incorrectly set; you seem to be building with the x86 toolchain. C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.EXE is the linker for x86, not ARM. The correct linker when using VS2008's cross compiler would be c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm\link.EXE.

INSTALL.WCE contains instructions for eMbedded Visual C++ that are not entirely applicable to VS2008 - in particular, the batch files that setup the environment are conspicuously missing from VS2008. You will have to find and/or make them yourself, which is pretty much about setting PATH, INCLUDE and LIB to point to the cross-compiler, the CE SDK's headers and libraries, respectively.

Assuming you do have a cross-compiler installed, either from VS2008 or one of the device SDKs, this should work. If you do not have a cross-compiler installed and since you are trying to build for CE 5, you could also get eMbedded Visual C++ which is freely available; be sure to grab the SP4 if you do so. With it, you should be able to follow the instructions in INSTALL.WCE to the letter.