Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the GNU C Library usable on non-GNU (or POSIX) platforms?

Tags:

c

windows

gnu

glibc

Just wondering, is the GNU C Library (glibc) usable on non-GNU and/or non-POSIX platforms such as Microsoft Windows?

like image 774
Anto Avatar asked Jan 22 '23 02:01

Anto


1 Answers

Yes, its possible in theory, but not really worth it in practice. You would need to port the syscall interface, dynamic linker, and other parts to Windows or your platform of choice, and Glibc is not an ideal candidate for this.

If you really need a self contained C library, I would consider newlib or uClibc (or FreeBSD's/OpenBSD's libc) over glibc. Glibc is a complex beast, the alternatives are much smaller and easier to understand.

like image 152
Yann Ramin Avatar answered Jan 29 '23 16:01

Yann Ramin