boost::winapi and Windows CE 7 and Windows Mobile 6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

boost::winapi and Windows CE 7 and Windows Mobile 6

Boost - Dev mailing list
Hello,

I am having big trouble migrating from 1.65.1 to 1.67 in VS2008 for CE
platform. We already have quite a few patches for boost we reapply on every
update. Boost 1.67 added more issues here and there, and among them the
winapi library.

On our old CE 7.00 I have winnt.h file where the second branch get selected.

#if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) ||
defined(_M_PPC) || defined(_M_IA64)) && !defined(MIDL_PASS)
#define DECLSPEC_IMPORT __declspec(dllimport)
#else
#define DECLSPEC_IMPORT
#endif


Therefore, WINAPI functions are not imported but is linked via corelib.lib
library.

So when I compile my code I see
3>D:\Dev\boost167\boost/winapi/semaphore.hpp(48) : error C2375:
'CreateSemaphoreW' : redefinition; different linkage
3>        C:\Program Files (x86)\Windows CE
Tools\SDKs\DS-200i\include\ARMv4I\winbase.h(3189) : see declaration of
'CreateSemaphoreW'


To make things worse in Windows Mobile 6 SDK half of API is imported and
half is not (goes through corelib.lib). Visual Studio 2008 installer
includes WM6 SDK.  And in the file
C:\Program Files (x86)\Windows Mobile 6
SDK\PocketPC\include\ARMV4I\winbase.h
there are functions not prefixed with WINBASEAPI.

The solution would be to have 2 new defines instead of BOOST_SYMBOL_IMPORT in
boost::winapi.  On CE 7 both would be empty, on WM 6 one would be
__declspec(dllimport)


Regards,
Vyacheslav

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: boost::winapi and Windows CE 7 and Windows Mobile 6

Boost - Dev mailing list
On 06/07/18 23:04, Vyacheslav Lanovets via Boost wrote:
> Hello,
>
> I am having big trouble migrating from 1.65.1 to 1.67 in VS2008 for CE
> platform. We already have quite a few patches for boost we reapply on every
> update. Boost 1.67 added more issues here and there, and among them the
> winapi library.

Sorry to hear that. Windows CE is not tested and therefore is not
properly supported. Pull requests are welcome, though.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: boost::winapi and Windows CE 7 and Windows Mobile 6

Boost - Dev mailing list
On Thu, Jun 7, 2018 at 4:45 PM Andrey Semashev via Boost <
[hidden email]> wrote:

> On 06/07/18 23:04, Vyacheslav Lanovets via Boost wrote:
> > Hello,
> >
> > I am having big trouble migrating from 1.65.1 to 1.67 in VS2008 for CE
> > platform. We already have quite a few patches for boost we reapply on
> every
> > update. Boost 1.67 added more issues here and there, and among them the
> > winapi library.
>
> Sorry to hear that. Windows CE is not tested and therefore is not
> properly supported. Pull requests are welcome, though.
>
>
I have asked Appveyor if they have any tips for adding Windows CE build jobs
which is something I could help with if there is a good solution.

In the meantime, instead of maintaining your own patches, submitting pull
requests
to get your patches into Boost.WinAPI will help reduce your maintenance
burden.

- Jim

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: boost::winapi and Windows CE 7 and Windows Mobile 6

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
On 8/06/2018 08:04, Vyacheslav Lanovets wrote:
> I am having big trouble migrating from 1.65.1 to 1.67 in VS2008 for CE
> platform. We already have quite a few patches for boost we reapply on every
> update. Boost 1.67 added more issues here and there, and among them the
> winapi library.

Another option is to define BOOST_USE_WINDOWS_H before including any
Boost headers to make it use the "real" platform headers.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost