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. How to create lib file for header file alone.

How to create lib file for header file alone.

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
9 Posts 4 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.
  • S Offline
    S Offline
    shanmugarajaa
    wrote on last edited by
    #1

    Dear Friends, I have header file named as sample.h. My intention is, I don't want to modified this header by others (programmer). So I decided to create lib file for this header file alone.whether is possible?? I don't know whether my approach is right.. kindly help on this.. your suggestion are highly appreciated. Thanks S. Shanmuga Raja

    C L 2 Replies Last reply
    0
    • S shanmugarajaa

      Dear Friends, I have header file named as sample.h. My intention is, I don't want to modified this header by others (programmer). So I decided to create lib file for this header file alone.whether is possible?? I don't know whether my approach is right.. kindly help on this.. your suggestion are highly appreciated. Thanks S. Shanmuga Raja

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

      I don't see your point. Both header and lib file are needed in order to link with a library.

      Veni, vidi, vici.

      1 Reply Last reply
      0
      • S shanmugarajaa

        Dear Friends, I have header file named as sample.h. My intention is, I don't want to modified this header by others (programmer). So I decided to create lib file for this header file alone.whether is possible?? I don't know whether my approach is right.. kindly help on this.. your suggestion are highly appreciated. Thanks S. Shanmuga Raja

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

        You cannot prevent people from modifying the header file, but it will not be much use to them if it does not match the library that comes with it.

        L 1 Reply Last reply
        0
        • L Lost User

          You cannot prevent people from modifying the header file, but it will not be much use to them if it does not match the library that comes with it.

          L Offline
          L Offline
          leon de boer
          wrote on last edited by
          #4

          It would be easier to just make a DLL if that is all you are trying to do.

          In vino veritas

          L 1 Reply Last reply
          0
          • L leon de boer

            It would be easier to just make a DLL if that is all you are trying to do.

            In vino veritas

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

            I am not trying to do anything. And whether it's a static library or DLL makes no difference.

            C 1 Reply Last reply
            0
            • L Lost User

              I am not trying to do anything. And whether it's a static library or DLL makes no difference.

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

              :-D Lazy man.

              Veni, vidi, vici.

              L 1 Reply Last reply
              0
              • C CPallini

                :-D Lazy man.

                Veni, vidi, vici.

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

                Hey, I'm retired, I'm supposed to be lazy. ;P

                C 1 Reply Last reply
                0
                • L Lost User

                  Hey, I'm retired, I'm supposed to be lazy. ;P

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

                  The Lion never sleeps.

                  Veni, vidi, vici.

                  L 1 Reply Last reply
                  0
                  • C CPallini

                    The Lion never sleeps.

                    Veni, vidi, vici.

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

                    Parturiunt montes, nascetur ridiculus mus.

                    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