Rella
Rella

Reputation: 66955

What are defines on different platforms (windows, mac, linux) that can tell your code that is it part of an application, not a library?

So I wonder how my code that can be included into different projects can find out if it is included into library of application? (on Linux, Mac and Windows)

Upvotes: 1

Views: 122

Answers (1)

James Kanze
James Kanze

Reputation: 153929

The simple answer is that it can't. The decision whether an object file (generated by the compiler) is part of a library or part of the application isn't made until link time (and aren't libraries part of the application?).

Upvotes: 4

Related Questions