• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

GNU C compiler question

dabuddha

Lifer
I have an issue regarding header files.

Working in my own sandbox, I copied one header file over from our central development area (our source code repository) and made some modifications to it.

I guess the question is, is there a gcc flag I can use that will tell the compiler to go through the list of include dirs from the top down everytime it encounters a header file? Reason is, it's including my modified one just fine but when it gets to another header file that includes my modified one, it's pulling in the old version of the header file from the central repository instead of my modified one even though my sandbox is the first directory listed in the include dirs list.

Any help would be appreciated or a suggestion for a different place to post this would be good too.

TIA!
 
Is your central repo local to this build? AFAIK gcc only looks for includes in a small number of default places plus whatever you tell it, so either your repo is in one of those places (and that's a really bad idea) or your build process is making it find/get thsoe files somehow.
 
Well the thing is we don't want to have to pull all the source code/header files into our sandboxes to work on them. We have it setup where you only have to bring in only the particular source files you need and the system will look into the Central repository for the object files for the rest of the source code. I think I figured it out. What i did, is I added a -I- before any of the system include dirs which tells the compiler to go through the include list from the top down everytime it encounters a #include "abcd.h"

So far so good 🙂
 
Originally posted by: Nothinman
Well the thing is we don't want to have to pull all the source code/header files into our sandboxes to work on them.

Isn't that sort of the point of a central repository?

Not really. We consider our CDA (Central Development Area) to be the latest revision of all of our source code. Then every developer has their own sandbox where they can work on their own code. When a developer is ready to make changes, they can "checkout" code from the CDA which locks it in the CDA and then they can make changes. Once they're done and finished testing, they check the code back into the CDA.
Now developers can also get a read-only copy of the source code into the sandboxes to experiment with.
 
Not really. We consider our CDA (Central Development Area) to be the latest revision of all of our source code. Then every developer has their own sandbox where they can work on their own code. When a developer is ready to make changes, they can "checkout" code from the CDA which locks it in the CDA and then they can make changes. Once they're done and finished testing, they check the code back into the CDA.
Now developers can also get a read-only copy of the source code into the sandboxes to experiment with.

Sounds like a crappy SCCS then, checking out a read-write copy shouldn't lock other developers from checking the same files out.
 
Originally posted by: Nothinman
Not really. We consider our CDA (Central Development Area) to be the latest revision of all of our source code. Then every developer has their own sandbox where they can work on their own code. When a developer is ready to make changes, they can "checkout" code from the CDA which locks it in the CDA and then they can make changes. Once they're done and finished testing, they check the code back into the CDA.
Now developers can also get a read-only copy of the source code into the sandboxes to experiment with.

Sounds like a crappy SCCS then, checking out a read-write copy shouldn't lock other developers from checking the same files out.

Oh I agree with you on that which is why I'm working on converting our whole system over to using Subversion. But this system works fine for us now because we don't normally step on each other's toes anyways and people are still able to make changes to code in their own sandboxes. They're just responsible for merging those changes in when the file is released (unlocked)

 
Back
Top