Using and linking CRT functions from Cygwin runtime binaries

Rafael Kitover rkitover@gmail.com
Sun Aug 18 00:50:03 GMT 2024


Hi, haven't been here in a while.

I am building a Cygwin runtime dependent library with some Win32 API
code. I ran into a couple of issues related to CRT functions (MSVCRT
in the case of the Cygwin dll.)

I got a linker error for an undefined symbol for the CRT function
`stricmp()`. For the time being I added a trivial reimplementation.

What I'd like to know is whether it is possible to link CRT functions
to Cygwin runtime dependent binaries at all, and if so how.

The other problem, which I am fixing on the MinGW-w64 list, is that
some MinGW Win32 API headers fail to compile because some CRT
functions are undefined under Cygwin, in this case `sprintf_s()`. What
is the right way to fix this?


More information about the Cygwin mailing list