News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

PCH file of sdk.h under Windows

Started by ollydbg, August 12, 2013, 03:41:06 AM

Previous topic - Next topic

ollydbg

Hi, jens, I think this commit broken Windows build.


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:

-------------- 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.

-------------- 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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

sorinev

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.

MortenMacFly

Quote from: ollydbg on August 12, 2013, 03:41:06 AM
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on August 14, 2013, 02:12:16 PM
Quote from: ollydbg on August 12, 2013, 03:41:06 AM
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).

stahta01

#4
Someone, already patched it.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]