This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Want to build Win32 API code and Posix API code in Cygwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]