What are ld-linux.so.2 and linux-gate.so.1?

I hope that you’re not asking about the main entries, which are stating that for the requested library libm.so.6 it was found in the file /lib/libm.so.6, for example, but are asking about the two outliers. Why are they displayed differently? for linux-gate.so.1 it’s because it’s not actually a file on-disk – it’s exposed by the …

Read more

About inconsistent dll linkage

The purpose of the preprocessor statements: #ifdef _GUICTRLS #define GUI_CTRLS_EXPORT __declspec(dllexport) #else #define GUI_CTRLS_EXPORT __declspec(dllimport) #endif is to make sure that the header file declares the class or function as __declspec(dllexport) in the .dll where it is defined, and as __declspec(dllimport) for any other .dll that might want to use it. For this to work, …

Read more

Static functions declared in “C” header files

First I’d like to clarify my understanding of the situation you describe: The header contains (only) a static function declaration while the C file contains the definition, i.e. the function’s source code. For example some.h: static void f(); // potentially more declarations some.c: #include “some.h” static void f() { printf(“Hello world\n”); } // more code, …

Read more