As a first thought, this may not be a good solution, as any standard header files included inside class.cpp will now be defined under mynamesapce, which will lead to lot of mess.
Okay, I admit, I've oversimplified the description of my real implementation here. I have taken care of this, but thanks for pointing out.
Originally Posted by Santosh Reddy
If you still want to maintain it for some legacy reasons then
1. Change the file extension of cpp file to some like an include file (.h or .inc) and then include this file from both class.cpp and ns_class.cpp. That way qmake will give expected output.
2. You need to take care of the gaurd include macros (if used in the first place)
Bookmarks