On Thu, 12 May 2005, Steven Edwards wrote: [...]
But your defining UnixFSGetOpenFileNameW in the spec file so the import library will still have that function listed so if I link a dll to that import library its going to fail on Windows even if I am not calling that function.
No, that should not happen. If an application links with a library that exports funcA() and funcB() but it only calls funcA(), then it will only import funcA() and it will work on a system where that library only exports funcA().
We use this in many conformance tests: the test links normally with the dll and calls the functions that are found on all platforms directly. However for the APIs found on only some platforms it uses GetProcAddress() so the test will not import those. And even if the test is compiled on a platform where the dll has all the APIs, it still works on platforms where the dll is missing some of them because it does not import those APIs.