Score:0

How to detect that a C/C++ file is using windows specific stuff

sj flag

Basically I want to test files/libraries/code in general that wont run on Linux by detecting windows specific includes, program calls, dynamically linked libraries at runtime, anything that isn't Linux compatible.
This is to make sure that the resulting program always works under Linux.
I also have to automate this

Thanks!

David avatar
cn flag
WOW that is going to be one massive list I think, good luck.
us flag
This may be more suitable at Stack Overflow.
cn flag
Ray
You could "cheat" by actually performing the compilation and seeing if you get an error. That's how things like `autoconf` used to test if a library existed, etc. -- it actually performed a test compilation.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.