I am facing an issue with two release versions of our software. I have two executables (MS and Linux) respectively using MSVC and GCC compiled libraries.
Context:
My program contains a message_queue.hpp templated class, which inherits from a message_queue_inter.h interface. This interface contains includes from the static library. Both of the libraries are O2 optimized and without any debug info (Debug Information Format -> None for MSVC and -g0 for GCC).
The fact is that while I am debugging both of the executables (within Eclipse), GDB can find symbols for members in my derived class AND the base class (interface) in my MSVC executable (I can expand variables content in Eclipse in the Debug view)
On the contrary, the version using the GNU/Linux library cannot find symbols for members which are in the interface ONLY. If I try to access to a member from my interface, GDB returns "No Data Fields" for it. All the members of the derived (.hpp) class are displayed properly.
Why such a difference between the MSCV and GCC compilers ? I notice, of course, that the MSVC library is much bigger than the GCC one. Thanks to the "nm" tool, I can notice that the interface symbols are found in my MSVC lib, but are missing in the GNU/Linux one.
I am aware that release versions should not contain any debug information but I am wondering why I have access to this variable using MSVC and not with GCC. (I need to build a GCC debug version with g2 minimum to generate more symbols in order to display the content of the message queue).
I am lost !
Thanks for your help.