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

Modified & Improved wxWidgets Project Wizard

<< < (39/41) > >>

Biplab:
Thanks for the suggestion. :)

Initially I started with parsing and generating custom wxFB project files. But C::B was refusing to add it. Thus I dropped the idea. See more details on the following thread.


--- Quote ---http://forums.codeblocks.org/index.php?topic=4768.msg40734#msg40734
--- End quote ---

I've not looked into the issue yet. Once we figure this out, I'll make necessary changes. :)

Currently, few more MB of pch file will be generated with BCC and VC. ;)


But I'm not quite sure whether that will solve the problem or not.

AFAIK, compiler will expect similar headers across all the cpp files to create the pch file. Once you issue the following command, BCC will be in trouble. Following code will tell BCC to create a PCH file without any header includes which may create utter confusion for the compiler and most probably will fail to compile.


--- Code: ---#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif //WX_PRECOMP
--- End code ---


The best solution is to use, <wx/wxprec.h> across all the files but this will limit fine tuning if necessary. There will be another problem with GCC in this case. GCC requires <wx/wxprec.h> and <wx/wxprec.h.gch> to be at the same folder or the folder name containing *.gch file to be matching to compile.

This could create problems with C::B. C::B would then require this file to be added as a part of the project.

So you can see I'm also confused. :)

rjmyst3:

--- Quote from: Biplab on February 26, 2007, 04:14:41 pm ---Following code will tell BCC to create a PCH file without any header includes which may create utter confusion for the compiler and most probably will fail to compile.


--- Code: ---#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif //WX_PRECOMP

--- End code ---


--- End quote ---

It seems as that is a bad idea then. So the #pragma hdrstop for borland is only necessary when using a pch?

Should the pch block look more like this?

--- Code: ---#ifdef WX_PRECOMP

#include <pch header file>

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#else

#include <wx/wx.h>

#endif //WX_PRECOMP

--- End code ---

Biplab:

--- Quote from: rjmyst3 on February 26, 2007, 04:39:41 pm ---It seems as that is a bad idea then. So the #pragma hdrstop for borland is only necessary when using a pch?

--- End quote ---

You are correct. That is necessary to tell BCC to stop at that point. Unless BCC gets that pragma, it will include all header file in that cpp file to generate compiled pch file.

IMHO, your solution should work. I'll try and update you more details whether this works or not. :D

rjmyst3:
wxFB now generates that code, as of svn revision 899.

Also, we recently had to uprev our project file for an unrelated change, so if the wizard were to generate .fbp files of version 1.6, then older versions of wxFB would refuse to open them, thus ensuring that users have a recent enough version. This could be helpful for non-pch mode, at least.

Biplab:
I'm using Feb 17, 2007 build (3.0.20 beta 3) which produces v1.5 project files. So do I need to update the project files or wxFB will convert it once opened? :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version