I like to find the libc version (2.14, 2.15 etc) of the Linux machine I'm running on using PureBasic.
I wanted to use like this:
Code: Select all
Protected libcVersion.s = gnu_get_libc_version_()Thanks,
Kukulkan
Code: Select all
Protected libcVersion.s = gnu_get_libc_version_()Code: Select all
ImportC "-lc"
gnu_get_libc_version()
gnu_get_libc_release()
EndImport
Debug PeekS(gnu_get_libc_version(), -1, #PB_UTF8)
Debug PeekS(gnu_get_libc_release(), -1, #PB_UTF8)
I can confirm it on Ubuntu too, it works, however, IMO, their versioning is quite bizarre. For some reason, the current version is 2.21, which is actually preceded by all natural numbers up to 3, where it has "normal" nomenclature such as 2.3.x. That being said, for example, version 2.8 is actually older than 2.21, etc. - but there is no build/revision designation. Strange people, those penguins...infratec wrote:Hi,
this works for me:BerndCode: Select all
ImportC "-lc" gnu_get_libc_version() gnu_get_libc_release() EndImport Debug PeekS(gnu_get_libc_version(), -1, #PB_UTF8) Debug PeekS(gnu_get_libc_release(), -1, #PB_UTF8)