From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25663 invoked by alias); 24 Feb 2014 10:05:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 25649 invoked by uid 89); 24 Feb 2014 10:05:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Received: from smtpback.ht-systems.ru (HELO smtpback.ht-systems.ru) (78.110.50.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 24 Feb 2014 10:05:15 +0000 Received: from [91.78.166.180] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) id 1WHsPM-0007kD-L0; Mon, 24 Feb 2014 14:05:08 +0400 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Mon, 24 Feb 2014 09:55:38 -0000 Date: Mon, 24 Feb 2014 13:30:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <304015319.20140224135538@yandex.ru> To: Qw Liu , cygwin@cygwin.com Subject: Re: Want to build Win32 API code and Posix API code in Cygwin In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00616.txt.bz2 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