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. .obj file help

.obj file help

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 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.
  • C Offline
    C Offline
    Cvaji
    wrote on last edited by
    #1

    Hello everybody, I have a class with one member function and member variable declared in the header file. I have compiled my code and created obj file. When I opened the obj file I saw the decorated member function in the obj file. But I couldn't find the member variable in the obj file. I want to know whether compiler keep the member declared in my class in obj file or not? Please help me. -aji

    C L 2 Replies Last reply
    0
    • C Cvaji

      Hello everybody, I have a class with one member function and member variable declared in the header file. I have compiled my code and created obj file. When I opened the obj file I saw the decorated member function in the obj file. But I couldn't find the member variable in the obj file. I want to know whether compiler keep the member declared in my class in obj file or not? Please help me. -aji

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Well the class member is of course there. Anyway using dumpbin I may hardly find it (I assigned a fancy bit pattern to). In fact there is no symbolic name (or I failed to grab it). :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      1 Reply Last reply
      0
      • C Cvaji

        Hello everybody, I have a class with one member function and member variable declared in the header file. I have compiled my code and created obj file. When I opened the obj file I saw the decorated member function in the obj file. But I couldn't find the member variable in the obj file. I want to know whether compiler keep the member declared in my class in obj file or not? Please help me. -aji

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If it's a member function then it will not need a decorated name, as it is merely defined by the compiler as an offset into the object. When an object is instantiated the code will refer to it by its memory address, and the variable will be located by the offset value.

        txtspeak is the realm of 9 year old children, not developers. Christian Graus

        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