VisualStudio - ClassView / Gloabs : missed functions
-
I have included an header in my project in which are listed some function headers... eg: [code]//////////////// // NGNBASIC.H // //////////////// #ifndef NGNBASIC_H #define NGNBASIC_H float ngn_sign(float f); float ngn_rad2deg(float radiant); float ngn_deg2rad(float degrees); #endif[/code] I espect that these function appear under the "globals" labed in Class View, but this doesn't happen... instead, in another workspace where I work to produce the lib owned by that header, they are listed. What am I doing wrong? :confused: Thanks in advance for your time.
-
I have included an header in my project in which are listed some function headers... eg: [code]//////////////// // NGNBASIC.H // //////////////// #ifndef NGNBASIC_H #define NGNBASIC_H float ngn_sign(float f); float ngn_rad2deg(float radiant); float ngn_deg2rad(float degrees); #endif[/code] I espect that these function appear under the "globals" labed in Class View, but this doesn't happen... instead, in another workspace where I work to produce the lib owned by that header, they are listed. What am I doing wrong? :confused: Thanks in advance for your time.
Under globals only appear those functions that are actually defined in a .c or .cpp file included in the project, i.e. those who are provided by libs do not count (Otherwise, the whole MFC and Win32 API would appear in the classview!). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
Under globals only appear those functions that are actually defined in a .c or .cpp file included in the project, i.e. those who are provided by libs do not count (Otherwise, the whole MFC and Win32 API would appear in the classview!). Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
Ah, thanks :( is there no way to let class view to display them? Class interfaces are displayed, and I supply only .h files for them (implementation reside in .libs).
You could write dummy functions that fool ClassView into thinking your project implements them, but that the compiler ignores. Put the functions in some cpp file and wrap them like this:
#ifdef _SOME_DEFINE_THAT_IS_NEVER_DEFINED_ float ngn_sign(float f) { } #endif // #ifdef _SOME_DEFINE_THAT_IS_NEVER_DEFINED_
ClassView will now show them under Globals, because ClassView doesn't care about preprocessor directives like that. The compiler does, of course, and that code will never be included so long as you don't actually define the tag.
Ty
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." -Albert Einstein
-
You could write dummy functions that fool ClassView into thinking your project implements them, but that the compiler ignores. Put the functions in some cpp file and wrap them like this:
#ifdef _SOME_DEFINE_THAT_IS_NEVER_DEFINED_ float ngn_sign(float f) { } #endif // #ifdef _SOME_DEFINE_THAT_IS_NEVER_DEFINED_
ClassView will now show them under Globals, because ClassView doesn't care about preprocessor directives like that. The compiler does, of course, and that code will never be included so long as you don't actually define the tag.
Ty
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." -Albert Einstein