Author Topic: Tagging C++ compiler header files  (Read 13234 times)

StephenW

  • Senior Community Member
  • Posts: 197
  • Hero Points: 21
Tagging C++ compiler header files
« on: November 11, 2007, 10:02:56 PM »
I am trying to port a Borland C/C++ 5.5 program to Borland C/C++ for OS/2.  I have set up the header files and tagging for the newly installed Borland C/C++ 1.5 for OS/2, or so I thought.  But there is some problem, as when I do push-tag on the keyword "bool", for example, I am getting this file:

  E:\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\stdbool.h

which I do have as a .h for the Cygwin gcc compiler, but should not ever be referenced when I am configured for the Borland OS/2 compiler.  What I should get is no definition at all, as the version of C++ implemented by the Borland OS/2 compiler is from before bool was defined as being part of C++.  Another example is "timeb", which shows up five different definitions in five different compilers' .h files, with only the last .h being the correct one for the Borland OS/2 compiler.

So, how do I set up things so that only the include files and tag files for the compiler I want are referenced, instead of all configured compilers?

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Tagging C++ compiler header files
« Reply #1 on: November 11, 2007, 10:16:42 PM »
Did you add the Borland Compiler as a (new) compiler and set your 'Project>Props>Compiler' accordingly. This should work.
HS2

StephenW

  • Senior Community Member
  • Posts: 197
  • Hero Points: 21
Re: Tagging C++ compiler header files
« Reply #2 on: November 11, 2007, 10:45:22 PM »
Yes, that is what I did.  The *.h files from the Borland OS/2 compiler are the ones showing up in the Directories tab, so it seems to be installed correctly.  But SlickEdit seems to be searching all the tag files for C/C++ compilers when finding definitions.  I need to get it to just use the one for the Borland OS/2 *.h files, and I have no idea how to do that.  The "Tools/Tag Files" dialogue has a list of "C Compiler Configuration Tag Files" and a list of "C/C++ Tag Files".  In the latter, you can change the order of the files, but that does not help.  What I need is to only have the one tag file for the Borland OS/2 compiler being used when I am using that compiler.  And when I change to another project with another compiler, get just its tag file.  That is not working.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Tagging C++ compiler header files
« Reply #3 on: November 11, 2007, 10:57:20 PM »
When I added a compiler time ago I recognized that I had to add the 'Built-in Compiler Include Directories' also to my project directories as you did which seemed to be redundant in the first place.
But that's not all. Did you check the 'Compile/Link' tab of your project props that the Borland compiler is selected there ?
HS2

StephenW

  • Senior Community Member
  • Posts: 197
  • Hero Points: 21
Re: Tagging C++ compiler header files
« Reply #4 on: November 11, 2007, 11:18:23 PM »
Yes, that is where I built the Borland OS/2 compiler setup from.  I just checked, and it is still selected as the compiler there.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Tagging C++ compiler header files
« Reply #5 on: November 11, 2007, 11:33:55 PM »
Hmm - this 'works for me'...
E.g. when working with MS VS2003/5 solutions or MS KMDF projects (another compiler setup I'm using) I don't get tag matches for cygwin stuff and vice versa.
So what's the difference ???
Does the cygwin compiler tagfile appear in other categories too (except the 'C Compiler' node) ?
(My 'C/C++ Tags Files' in the Tools>Tag File setup are empty b/c I don't use extension specific projects/tag files. And I'm using SE 12.0.3 r12.)
HS2

StephenW

  • Senior Community Member
  • Posts: 197
  • Hero Points: 21
Re: Tagging C++ compiler header files
« Reply #6 on: November 11, 2007, 11:38:48 PM »
That was it!  Your are a genius!  Somehow I had all the compiler tag files also as extenstion specific tag files.  Removing them makes it work.  Thank you!