• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

In C++ what type of header file changes would not cause either a linkage or run time

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    In C++ what type of header file changes would not cause either a linkage or run time

    In C++ what type of .dll header file changes would NOT cause either a linkage or run time error with any other .dll which is dependent on it ?

    I'm thinking of non-static stand alone functions in the header file or simple non-static data variables e.g.

    .h
    .....
    void printMe(int x);
    int x;


    Am I right or do you disagree ? I belive changes to the header file including changing the signature of member functions in a class whether they be public, private or protected is going to break any .dll dependancies....

    #2
    Originally posted by eliquant View Post
    In C++ what type of .dll header file changes would NOT cause either a linkage or run time error with any other .dll which is dependent on it ?

    I'm thinking of non-static stand alone functions in the header file or simple non-static data variables e.g.

    .h
    .....
    void printMe(int x);
    int x;


    Am I right or do you disagree ? I belive changes to the header file including changing the signature of member functions in a class whether they be public, private or protected is going to break any .dll dependancies....
    Good Grief - what kind of mumbo-jumbo is this ?

    Comment


      #3
      sounds like an anal interview question that in no way demonstrates how good you are at the job.

      Don't even try to play the game, it is designed to make you have a sleepless night wondering why you didn't know the answer.

      We wouldn't put anything even onto a test system without recompiling everything that had a dependency. But there are brainless idiots in City banks who pride themselves on putting everyone's bank account at risk just to show how bloody clever they are.

      No wonder they're all bankrupt.

      I used to think to myself, hey these guys make pots of money so maybe I am stupid. But I've now changed my mind.
      Last edited by BlasterBates; 3 February 2009, 18:30.
      I'm alright Jack

      Comment


        #4
        Originally posted by eliquant View Post
        In C++ what type of .dll header file changes would NOT cause either a linkage or run time error with any other .dll which is dependent on it ?

        I'm thinking of non-static stand alone functions in the header file or simple non-static data variables e.g.

        .h
        .....
        void printMe(int x);
        int x;


        Am I right or do you disagree ? I belive changes to the header file including changing the signature of member functions in a class whether they be public, private or protected is going to break any .dll dependancies....
        How vague is this? A linker error could be from many things. Do you have a specific error message? If a linker is failing to link to exported functions in a dll I have to confess it sounds like you forgot to include the corresponding lib file.

        As for static functions, they should not be implemented in the header file, rather the function protoype should be declared in the header file.

        Post your error output (if this is not an interview question)

        Knock first as I might be balancing my chakras.

        Comment


          #5
          Originally posted by BlasterBates View Post
          sounds like an anal interview question that in no way demonstrates how good you are at the job.

          Don't even try to play the game, it is designed to make you have a sleepless night wondering why you didn't know the answer.

          We wouldn't put anything even onto a test system without recompiling everything that had a dependency. But there are brainless idiots in City banks who pride themselves on putting everyone's bank account at risk just to show how bloody clever they are.

          No wonder they're all bankrupt.

          I used to think to myself, hey these guys make pots of money so maybe I am stupid. But I've now changed my mind.
          After 22 years in the city this post sums it up! The number of times I am asked stupid stuff at interview that can be googled.

          Blaster Bates for PM. Well, head of RBS anyway......

          Comment


            #6
            Originally posted by BrilloPad View Post
            After 22 years in the city this post sums it up! The number of times I am asked stupid stuff at interview that can be googled.

            Blaster Bates for PM. Well, head of RBS anyway......
            Had that lots. What do you do when you get THAT kind of interview, with some self important knob asking you stuff that you would only know if you had cribbed it from the same textbook?

            I must admit I get slightly fed up, and ask why anyone would be expected to know the answer.

            "Surely compiler switches for 64 bit risk processor optimisation are common knowledge?"

            Knock first as I might be balancing my chakras.

            Comment


              #7
              LOL at all the feeble minded .NETers, SQLers and HTMLers struggling to understand real programming.

              It's the signature that's going to cause you problems; i.e. changing the name or changing the parameter types, changing something to virtual that wasn't before. And for that matter, you're generally okay adding non-virtual or static functions but adding virtual functions, even to an interface won't be a DLL load error but will more than likely result in you calling function A and ending up in function B.

              I do this all the time as I have one project with an EXE and lots of DLLs, and I save myself build time by just building the DLL that I'm working on. I usually know when I need to build the whole thing, but do get caught out from time to time.

              Of course I'd never release anything that wasn't a full clean build.
              Will work inside IR35. Or for food.

              Comment


                #8
                Originally posted by VectraMan View Post
                LOL at all the feeble minded .NETers, SQLers and HTMLers struggling to understand real programming.

                It's the signature that's going to cause you problems; i.e. changing the name or changing the parameter types, changing something to virtual that wasn't before. And for that matter, you're generally okay adding non-virtual or static functions but adding virtual functions, even to an interface won't be a DLL load error but will more than likely result in you calling function A and ending up in function B.

                I do this all the time as I have one project with an EXE and lots of DLLs, and I save myself build time by just building the DLL that I'm working on. I usually know when I need to build the whole thing, but do get caught out from time to time.

                Of course I'd never release anything that wasn't a full clean build.
                Do you work in a bank?

                Comment


                  #9
                  Originally posted by VectraMan View Post
                  LOL at all the feeble minded .NETers, SQLers and HTMLers struggling to understand real programming.

                  It's the signature that's going to cause you problems; i.e. changing the name or changing the parameter types, changing something to virtual that wasn't before. And for that matter, you're generally okay adding non-virtual or static functions but adding virtual functions, even to an interface won't be a DLL load error but will more than likely result in you calling function A and ending up in function B.

                  I do this all the time as I have one project with an EXE and lots of DLLs, and I save myself build time by just building the DLL that I'm working on. I usually know when I need to build the whole thing, but do get caught out from time to time.

                  Of course I'd never release anything that wasn't a full clean build.
                  Me understand programming plenty good!!!

                  How did you get that from what he said. Need error outputs.

                  Of course if you change the function PROTOTYPE, the IMPLEMENTATION needs to change. FFS. Nothing to see here.

                  Proper programming indeed. Are you always this quick off the mark?

                  Knock first as I might be balancing my chakras.

                  Comment


                    #10
                    Originally posted by eliquant View Post
                    In C++ what type of .dll header file changes would NOT cause either a linkage or run time error with any other .dll which is dependent on it ?

                    I'm thinking of non-static stand alone functions in the header file or simple non-static data variables e.g.

                    .h
                    .....
                    void printMe(int x);
                    int x;


                    Am I right or do you disagree ? I belive changes to the header file including changing the signature of member functions in a class whether they be public, private or protected is going to break any .dll dependancies....
                    It certainly should.

                    Comment

                    Working...
                    X