[CMake] Visual Studio and Windows Mobile SDKs

Clemens Arth Clemens.Arth at gmx.at
Tue Jul 1 02:34:31 EDT 2008


Hi,

I took a look at your files and I think you have done a pretty good job and that should work out well. For some reason I had to force the compiler setting to be MSVC, because cmake did not set it automatically. 

cmake --try-compile -DCMAKE_TOOLCHAIN_FILE="C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/Platform/platform_wince_cl_arm.cmake" -G"Visual Studio 9 2008" -DCMAKE_C_COMPILER_ID="MSVC" ..

As I mentioned earlier there are "Smartphone" and "PocketPC" configurations in Windows Mobile 5/6. As a result, I still have to keep WINCE_HOST_CMAKE_PATH under "C:/Program Files/Microsoft Visual Studio 9.0/VC/ce", but I have to set WINCE_SDK_CMAKE_PATH such that I either points to "C:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC" or to "C:\Program Files\Windows Mobile 5.0 SDK R2\SmartPhone". These subdirectories include the include/lib subdirectories in the case of wm5/6, which I also think might be the main difference between both configurations.

I think I was not totally mistaken when I thought Mobile 5 and CE 5 were more-or-less the same, because using your files I get quite far now. However, the linker returns an error for mobile 5 and 6:

module machine type 'X86' conflicts with target machine type 'THUMB'

This might be due to a missing compiler/linker flag I guess. Has anyone worked around that error yet?

Regards
Clemens

-------- Original-Nachricht --------
> Datum: Mon, 30 Jun 2008 11:49:19 +0200
> Von: "Andreas Pokorny" <andreas.pokorny at gmail.com>
> An: a.neundorf-work at gmx.net
> CC: cmake at cmake.org
> Betreff: Re: [CMake] Visual Studio and Windows Mobile SDKs

> Hi,
> 
> Why is there a Windows-cl.cmake and no Window-msvc.cmake?
> 
> Shall I include things like Platform/cl inside a WinCE-msvc file?
> 
> Will I need both
> WinCE-MSVC-C-YourHardware.cmake
> and
> WinCE-MSVC-CXX-YourHardware.cmake?
> 
> I have attached the current status, it would be nice if you could
> review the changes.
> 
> 
> kind regards
> Andreas Pokorny
> 
> 2008/6/29 Alexander Neundorf <a.neundorf-work at gmx.net>:
> > On Saturday 28 June 2008, Andreas Pokorny wrote:
> >> Hi there,
> >> We have just started getting WinCE platform files to work. I have
> worked
> >> around the /system:console issues mentioned in the mails below. I
> basically
> >> reused the existing Windows and Windows-cl platform files, and made
> changes
> >> where the scripts try to execute compiled applications. Building
> >> console-like applications  - well... applications with an int main - is
> >> possible, but requires
> >> specifying mainACRTStartup as /ENTRY: point. This was done to get the
> >> default C and CXX tests working.
> >>
> >> There are some remaining issues .. like getting all compiler flags and
> >> include paths right. I have no idea what most of the flags do. I
> believe
> >> the include paths
> >> and machine type options have to be provided by a CMAKE_TOOLCHAIN_FILE.
> >
> > No. The flags should either come from the Windows-cl.cmake file (or
> > equivalent), or if that isn't specific enough, from a
> > Windows-cl-${CMAKE_SYSTEM_PROCESSOR}.cmake (or equivalent for WinCE)
> file.
> > Even better would be the
> >
> ${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR}.cmake
> > file, i.e. WinCE-MSVC-C-YourHardware.cmake. For details see
> > Modules/CMakeCInformation.cmake.
> >
> > Alex
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
> >

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


More information about the CMake mailing list