C++ Builder XE: find out where a specific h file is includedC++ Builder or Visual Studio for native C++ development?How can I add libCurl to a Borland C++ Builder 6 Project?C++ Builder XE OBJ fileC++ Builder XE: Installing a componentBorland C++ Builder: Some UI-Events not available anymore?C++ Builder : #include <iostream> errorUsing MSBUILD with C++ Builder 2010Use COM in C++ Builder“uses” section equivalent in C++ BuilderUnable to open include file 'inttypes.h' in Borland C++ Builder

Why is the Intel 8086 CPU called a 16-bit CPU?

I have found a mistake on someone's code published online: what is the protocol?

Why is Google approaching my VPS machine?

How long were the Apollo astronauts allowed to breathe 100% oxygen at 1 atmosphere continuously?

Diagram of Methods to Solve Differential Equations

Making a Dataset that emulates `ls -tlra`?

You have no, but can try for yes

Inscriptio Labyrinthica

Will the internet speed decrease on second router if there are multiple devices connected to primary router?

How important are the Author's mood and feelings for writing a story?

Last-minute canceled work-trip mean I'll lose thousands of dollars on planned vacation

Why teach C using scanf without talking about command line arguments?

Brute-force the switchboard

Which failed attempts have there been to find a contradiction in ZFC or ZF?

How was Luke's prosthetic hand in Episode V filmed?

Company looks for long-term employees, but I know I won't be interested in staying long

Does unblocking power bar outlets through short extension cords increase fire risk?

Can a creature targeted by the Glamour bard's Mantle of Inspiration use its reaction to move if it already had temporary hit points previously?

Who would use the word "manky"?

Is it possible to have a career in SciComp without contributing to arms research?

How do you send money when you're not sure it's not a scam?

How can I automate this tensor computation?

Difference between class and struct in with regards to padding and inheritance

Applying for jobs with an obvious scar



C++ Builder XE: find out where a specific h file is included


C++ Builder or Visual Studio for native C++ development?How can I add libCurl to a Borland C++ Builder 6 Project?C++ Builder XE OBJ fileC++ Builder XE: Installing a componentBorland C++ Builder: Some UI-Events not available anymore?C++ Builder : #include <iostream> errorUsing MSBUILD with C++ Builder 2010Use COM in C++ Builder“uses” section equivalent in C++ BuilderUnable to open include file 'inttypes.h' in Borland C++ Builder






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm currently porting a rather big project from C++ Builder 5 to the newest version, C++ Builder XE. It's my first experience with C++ Builder. I'm stuck with an error in a file, but I don't want to include this file anyway (it's code of a component not required anymore). I was not able to find out where and how this file is included, however. The compiler error does not give any hint at all apart from the error itself. How do you usually find out where a file is included?










share|improve this question




























    1















    I'm currently porting a rather big project from C++ Builder 5 to the newest version, C++ Builder XE. It's my first experience with C++ Builder. I'm stuck with an error in a file, but I don't want to include this file anyway (it's code of a component not required anymore). I was not able to find out where and how this file is included, however. The compiler error does not give any hint at all apart from the error itself. How do you usually find out where a file is included?










    share|improve this question
























      1












      1








      1


      1






      I'm currently porting a rather big project from C++ Builder 5 to the newest version, C++ Builder XE. It's my first experience with C++ Builder. I'm stuck with an error in a file, but I don't want to include this file anyway (it's code of a component not required anymore). I was not able to find out where and how this file is included, however. The compiler error does not give any hint at all apart from the error itself. How do you usually find out where a file is included?










      share|improve this question














      I'm currently porting a rather big project from C++ Builder 5 to the newest version, C++ Builder XE. It's my first experience with C++ Builder. I'm stuck with an error in a file, but I don't want to include this file anyway (it's code of a component not required anymore). I was not able to find out where and how this file is included, however. The compiler error does not give any hint at all apart from the error itself. How do you usually find out where a file is included?







      c++builder






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 14 '11 at 13:28









      mortmort

      6,11914 gold badges34 silver badges88 bronze badges




      6,11914 gold badges34 silver badges88 bronze badges






















          3 Answers
          3






          active

          oldest

          votes


















          5














          The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
          The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
          This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.






          share|improve this answer























          • Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

            – mort
            Jul 15 '11 at 7:44











          • If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

            – David Dean
            Jul 18 '11 at 16:44


















          1














          In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.






          share|improve this answer























          • Thanks for the tip, but where can I find this setting?

            – mort
            Jul 18 '11 at 5:51











          • Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

            – Kris Kumler
            Jul 18 '11 at 19:58


















          1














          If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).



          If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.






          share|improve this answer

























          • I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

            – mort
            Jul 15 '11 at 7:05













          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6693884%2fc-builder-xe-find-out-where-a-specific-h-file-is-included%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5














          The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
          The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
          This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.






          share|improve this answer























          • Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

            – mort
            Jul 15 '11 at 7:44











          • If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

            – David Dean
            Jul 18 '11 at 16:44















          5














          The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
          The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
          This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.






          share|improve this answer























          • Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

            – mort
            Jul 15 '11 at 7:44











          • If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

            – David Dean
            Jul 18 '11 at 16:44













          5












          5








          5







          The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
          The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
          This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.






          share|improve this answer













          The preprocessor is perfect for this. Right click on the cpp file which gives you the error in the project manager then choose "preprocess"
          The output from this tells you every file and line number in the order they are processed. You can then search for the file in question, and the line above it is the file that included it.
          This could conceivably be another header file as well, so it could be a long chain, but you can determine exactly where it comes from.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 14 '11 at 19:18









          David DeanDavid Dean

          2,60419 silver badges32 bronze badges




          2,60419 silver badges32 bronze badges












          • Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

            – mort
            Jul 15 '11 at 7:44











          • If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

            – David Dean
            Jul 18 '11 at 16:44

















          • Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

            – mort
            Jul 15 '11 at 7:44











          • If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

            – David Dean
            Jul 18 '11 at 16:44
















          Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

          – mort
          Jul 15 '11 at 7:44





          Hm, I tried that, but I can't find the file that causes the error within the output. Why could that be? I know that the file that eventually causes the error is included in the file I want to compile indirectly through a chain of five other headers - but I can't even find the second one of this chain within the output.

          – mort
          Jul 15 '11 at 7:44













          If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

          – David Dean
          Jul 18 '11 at 16:44





          If you are preprocessing the correct cpp file, the exact file and line from your error message should be in the .i file. You should be able to search for problemheader.h: 999 if that is where the error message points to.

          – David Dean
          Jul 18 '11 at 16:44













          1














          In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.






          share|improve this answer























          • Thanks for the tip, but where can I find this setting?

            – mort
            Jul 18 '11 at 5:51











          • Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

            – Kris Kumler
            Jul 18 '11 at 19:58















          1














          In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.






          share|improve this answer























          • Thanks for the tip, but where can I find this setting?

            – mort
            Jul 18 '11 at 5:51











          • Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

            – Kris Kumler
            Jul 18 '11 at 19:58













          1












          1








          1







          In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.






          share|improve this answer













          In the Project Options, enable the compiler's general messages. When the compiler encounters an error, you will be able to see the chain of includes that lead to the erroneous code.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 17 '11 at 1:54









          Remy LebeauRemy Lebeau

          356k19 gold badges286 silver badges481 bronze badges




          356k19 gold badges286 silver badges481 bronze badges












          • Thanks for the tip, but where can I find this setting?

            – mort
            Jul 18 '11 at 5:51











          • Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

            – Kris Kumler
            Jul 18 '11 at 19:58

















          • Thanks for the tip, but where can I find this setting?

            – mort
            Jul 18 '11 at 5:51











          • Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

            – Kris Kumler
            Jul 18 '11 at 19:58
















          Thanks for the tip, but where can I find this setting?

          – mort
          Jul 18 '11 at 5:51





          Thanks for the tip, but where can I find this setting?

          – mort
          Jul 18 '11 at 5:51













          Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

          – Kris Kumler
          Jul 18 '11 at 19:58





          Tools->Options...->Environmental Options->C++ Options->Project Properties, "Show general messages"

          – Kris Kumler
          Jul 18 '11 at 19:58











          1














          If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).



          If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.






          share|improve this answer

























          • I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

            – mort
            Jul 15 '11 at 7:05















          1














          If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).



          If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.






          share|improve this answer

























          • I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

            – mort
            Jul 15 '11 at 7:05













          1












          1








          1







          If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).



          If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.






          share|improve this answer















          If the files in question are rather sizable, a tool like Doxygen can be helpful in showing you the include dependencies (as well as call paths, etc.).



          If it's just once or twice you'll have to do this, David Dean's suggestion of the preprocessor is golden.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 10:48









          albert

          3,3853 gold badges11 silver badges25 bronze badges




          3,3853 gold badges11 silver badges25 bronze badges










          answered Jul 14 '11 at 20:22









          Kris KumlerKris Kumler

          5,9023 gold badges19 silver badges27 bronze badges




          5,9023 gold badges19 silver badges27 bronze badges












          • I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

            – mort
            Jul 15 '11 at 7:05

















          • I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

            – mort
            Jul 15 '11 at 7:05
















          I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

          – mort
          Jul 15 '11 at 7:05





          I already thought about Doxygen too, since we already use it. Only problem is: the files I want to get rid of are external ones (from various components), so you can't see at once where these files are included, you can only check for files within the project if they - maybe indirectly - include a certain file. This is a big help, but not very comfortable.

          – mort
          Jul 15 '11 at 7:05

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f6693884%2fc-builder-xe-find-out-where-a-specific-h-file-is-included%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript