This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Want to build Win32 API code and Posix API code in Cygwin
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Qw Liu <liuqw093 at gmail dot com>, cygwin at cygwin dot com
- Date: Mon, 24 Feb 2014 13:55:38 +0400
- Subject: Re: Want to build Win32 API code and Posix API code in Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <CA+-2duzzdkkYiXirqo=7FVOkXgDyyUXLy3+3NNmF6UND9aLMcg at mail dot gmail dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Qw Liu!
> I have legacy code (part A) written in Posix API that I want to
> port to Windows, and there is also some other necessary code (part B)
> written in Win32 API, but seems that I cannot use GCC on Cygwin to
> build them (A and B) together to get the executable program, since I
> met issue like "header missing" for Win32 API .
> Is there any other method to resolve such problem? I considerred
> to build part B as dll first and build with part A on Cygwin. Is that
> okay?
My Crystal Ball is in service - overheated again...
WHAT header you are missing, exactly?
And before you answer that, you do aware, that mixing POSIX and Windows native
API calls is generally considered not a very good idea, right?
Depends on the kind of mix (stirred, not shaken?), you may be on a very sharp
edge of things.
Without looking at your code, one possible solution is to push all
platform-dependent code into a separate library, and load it at runtime.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 24.02.2014, <13:49>
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple