X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=rvL741AkdI+Lo8C/ tr0xAmA8wkyex1Yjxausl1I8da8YJuv5I8+Wiw2LNMMCW1PjOX6XfklRh3A6Yo8x XX9AF7/sNZukdQm1IdwoWVlsr4mG9Azneh0FCkzj8c73N6BN+bGkxuFyyij/pDHi 9haspB+TAWYQuuwUjYMFZFQXgi4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=DuPeY9UU2BE69seLRDtwQ7 FmdP4=; b=AzLTgLd2dX/w7Z6zFmnTBG+0Kw+icCNZyt1jpCjkXkVG1nAu5BcqV/ DYQGPL/c0zQ31+y7QI7JtdKxhe2rgk5yI8D7UTYtrDlKZ1JN50EJWlZjbIdguUy/ j1rSS7Xh9C8WmY1mc88aiRNiSpKDrhWoVBrXNZ9Gzh7+/i966ISJ4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Mon, 24 Feb 2014 13:55:38 +0400 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <304015319.20140224135538@yandex.ru> To: Qw Liu , cygwin AT cygwin DOT 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 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 AT yandex DOT 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