Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Proposed Rules and suggestions for using PCH properly under Windows

(1/7) > >>

stahta01:
Link to my Git copy of the rules/suggestions I am working on

Edit: New Location for rules https://github.com/stahta01/cb_misc/blob/master/Notes/Rules%20and%20suggestions%20for%20using%20PCH%20properly%20under%20Windows.txt

Note: This section needs additions because I have tested the compiler option "-include sdk.h" and it works better for at least some CB plugins.

--- Quote ---Required rules for using PCH properly under Windows
   1. This sdk_common.h file should only be included by sdk.h and sdk_precomp.h
   2. Use sdk.h instead of sdk_precomp.h in CB Plugins
   3. Do NOT include sdk.h from inside header files (unless that header is making a PCH).
   4. Do NOT include wx.h or wxprec.h inside header files (unless that header is making a PCH).
   5. Do NOT include a header file before include sdk.h.
   6. Do NOT do a pragma before include sdk.h.
   7. Should have "-Winvalid-pch" warning set.
   8. Must have the folder containing sdk.k and sdk.h.gch in the search path!
      NOTE: The folder containing sdk.h.gch must before the sdk.k folder.

--- End quote ---

I really would like feedback on the first rule.

--- Quote ---Required rules for using PCH properly under Windows
   1. This sdk_common.h file should only be included by sdk.h and sdk_precomp.h

--- End quote ---

If it is acceptable, I will attach a patch that fixes the problem.
Link to this patch https://github.com/stahta01/codeblocks/blob/PCH/Patches/svn/cb_src_remove_sdk_common_h_new.patch
Note: I plan to remove the "_new" from the end of my patches in the future.

Tim S.

oBFusCATed:
Why don't you just fork my repo and apply patches directly, then ask for  a pull?

stahta01:

--- Quote from: oBFusCATed on May 06, 2014, 04:32:20 pm ---Why don't you just fork my repo and apply patches directly, then ask for  a pull?

--- End quote ---

I will have to learn how to do this; would this result in the patches making it to Code::Blocks once you OK them?

Because I am a Git newbie, I have little experience on using Git correctly; I am willing to do it if you think it is the correct way to get the patches into the CB svn trunk. Might be a while before I learn how to do it right.

Any good URL links on how to use Git correctly you can give me?

Please give me the link to use in forking your repo?
Found it. https://github.com/obfuscated/codeblocks_sf

Tim S.



oBFusCATed:
Hm, you can look around the help of github. There are plenty of examples.

The steps should be something like:
1. Clone the repo
2. checkout master
3. create new branch
4. make some commits
5. push the branch to your own repo
6. post here with the link to the branch

For me this way it is easier to look at patches and then try them.

stahta01:

--- Quote from: oBFusCATed on May 06, 2014, 08:04:07 pm ---Hm, you can look around the help of github. There are plenty of examples.

The steps should be something like:
1. Clone the repo
2. checkout master
3. create new branch
4. make some commits
5. push the branch to your own repo
6. post here with the link to the branch

For me this way it is easier to look at patches and then try them.

--- End quote ---

Link to the repo of the stuff I think ready to commit upstream.
https://github.com/stahta01/codeblocks_sf/tree/win_build_speedup
Right now, it is only the patch to remove the includes of "sdk_common.h".

Edit: Decided to delete my fork and re-create it with a minor name change.
Did too many things wrong in it.

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version