Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VisualStudio - ClassView / Gloabs : missed functions

VisualStudio - ClassView / Gloabs : missed functions

Scheduled Pinned Locked Moved C / C++ / MFC
questionworkspace
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lockhart
    wrote on last edited by
    #1

    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.

    J 1 Reply Last reply
    0
    • L Lockhart

      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.

      J Offline
      J Offline
      Joaquin M Lopez Munoz
      wrote on last edited by
      #2

      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

      L 1 Reply Last reply
      0
      • J Joaquin M Lopez Munoz

        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

        L Offline
        L Offline
        Lockhart
        wrote on last edited by
        #3

        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).

        T 1 Reply Last reply
        0
        • L Lockhart

          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).

          T Offline
          T Offline
          TyMatthews
          wrote on last edited by
          #4

          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

          L 1 Reply Last reply
          0
          • T TyMatthews

            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

            L Offline
            L Offline
            Lockhart
            wrote on last edited by
            #5

            Thanks for the trick :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups