delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/24/05:05:37

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <304015319.20140224135538@yandex.ru>
To: Qw Liu <liuqw093 AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Want to build Win32 API code and Posix API code in Cygwin
In-Reply-To: <CA+-2duzzdkkYiXirqo=7FVOkXgDyyUXLy3+3NNmF6UND9aLMcg@mail.gmail.com>
References: <CA+-2duzzdkkYiXirqo=7FVOkXgDyyUXLy3+3NNmF6UND9aLMcg AT mail DOT gmail DOT com>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019