Hi

I am trying to use a pointer to implementation pattern in Qt so I have a public interface class and two private classes. One of them using Qt functions for connectivity and another native Windows Mobile functions.

So I am using VS and I am building for both Windows Mobile and Win32

I have selected exclude from build on both the .h and cpp file. I am excluding the private Qt file for Windows Mobile and the native WinMo file for Win32.

The problem occurs when I switch between Win32 and WinMo. The moc_ file for the platform I am not building for is still in the Generated Files list in VS so it is trying to generate both private classes which have the same functions and the linking fails. It does not help if I exclude the file from build, the 2 moc files are still in the list of generated files and linking will fail.

I guess I could change in the Qt plugin for VS so that the files are Generated in different folders based on platform. The drawback with this are:
1. There are some other params in the Qt plugin that point to the Generated Files folder and I am not sure how they would be affected by changing it.
2. This would require every developer to remember and change this in his Qt plugin for VS and that is error prone.

If anyone has another suggestion on how to handle this, please let me know.