Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on August 12, 2013, 03:41:06 am

Title: PCH file of sdk.h under Windows
Post by: ollydbg on August 12, 2013, 03:41:06 am
Hi, jens, I think this commit broken Windows build.

Code
 src/CodeBlocks.cbp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/CodeBlocks.cbp b/src/CodeBlocks.cbp
index 1f6835d..f519b7c 100644
--- a/src/CodeBlocks.cbp
+++ b/src/CodeBlocks.cbp
@@ -1261,7 +1261,7 @@
  <Unit filename="include/sdk.h">
  <Option compile="1" />
  <Option weight="1" />
- <Option target="src" />
+ <Option target="sdk" />
  </Unit>
  <Unit filename="include/sdk_common.h">
  <Option target="sdk" />

Under Windows, there are different PCH files.
sdk.h.gch is used for src target and all the plugins
sdk_precomp.h.gch is used for sdk target only

When building the current SVN trunk, I see a log of warnings:
Code
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[  3.0%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -IE:\code\cb\wx\wxWidgets-2.8.12\include -IE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c F:\cb_sf_git\trunk\src\src\app.cpp -o .objs\src\app.o
F:\cb_sf_git\trunk\src\src\app.cpp:10:17: warning: .objs\include/sdk.h.gch: not used because `EXPORT_LIB' not defined [-Winvalid-pch]
...

I see that both sdk.h.gch and sdk_precomp.h.gch are generated when building sdk target.

If I delete the two gch files, and try to build the src target, there is no warnings, which means the src target is building without the pch file support.

But I think: sdk.h.gch should be generated in the first step of building src target.
Code
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------

[  2.7%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -IE:\code\cb\wx\wxWidgets-2.8.12\include -IE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c F:\cb_sf_git\trunk\src\include\sdk.h -o .objs\include\sdk.h.gch
[  5.4%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -iquote.objs\include -I.objs\include -I. -IE:\code\cb\wx\wxWidgets-2.8.12\include -IE:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -c F:\cb_sf_git\trunk\src\src\app.cpp -o .objs\src\app.o

Any ideas? I think the commit above should be reverted for Windows cbp.

Thanks.
Title: Re: PCH file of sdk.h under Windows
Post by: sorinev on August 14, 2013, 10:56:05 am
Does this have anything to do with my svn only showing 9248 when C::B is started up, even though my checkout directory is up to date at 9251? I'm on Windows.

When doing a clean build, I got that error too. 114 instances of it.
Title: Re: PCH file of sdk.h under Windows
Post by: MortenMacFly on August 14, 2013, 02:12:16 pm
Any ideas? I think the commit above should be reverted for Windows cbp.
This specific part for the Windows projects: Yes. I just stumbled across this myself.
Title: Re: PCH file of sdk.h under Windows
Post by: Jenna on August 14, 2013, 03:29:56 pm
Any ideas? I think the commit above should be reverted for Windows cbp.
This specific part for the Windows projects: Yes. I just stumbled across this myself.
It should either be reverted or fixed in an  other way.
I can not do it myself at the moment (not at home since monday, probably later the next night, too much work).
Title: Re: PCH file of sdk.h under Windows
Post by: stahta01 on August 17, 2013, 03:08:26 pm
Someone, already patched it.