registry.cpp not #if wxUSE_CONFIG wrapped?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

registry.cpp not #if wxUSE_CONFIG wrapped?

Post by metalogic » Sun May 08, 2005 10:52 pm

I defined wxUSE_CONFIG 0 but it was still compiling the registry class.

If this is a bug (can anyone confirm?) how do I report it?

Details
VC++ 2003
wxWidgets 2.6.0
Windows 2000

Cursor
Earned some good credits
Earned some good credits
Posts: 120
Joined: Sun Aug 29, 2004 3:09 pm
Location: Grenoble, France
Contact:

Post by Cursor » Mon May 09, 2005 5:49 am

IMHO it is not.
wxUSE_CONFIG is for the wxConfig classes but you can use the registry (windows only) without the wxConfig classes.

No preprocessor definition is present to disable the registry class. But is is not a problem because wxRegistry is support only on windows and all windows plateform support it.
What is little and green, witch go up and down ??
Yoda playing with the force.

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Mon May 09, 2005 3:47 pm

Well, it is a problem if you are trying to minimize the size of the library. I don't need the registry and I would rather not have it compiled in.

If it shouldn't be tied to wxUSE_CONFIG I think it should have it's own #define.

Thanks for replying.

- Santiago

User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX » Mon May 09, 2005 3:58 pm

metalogic wrote:Well, it is a problem if you are trying to minimize the size of the library. I don't need the registry and I would rather not have it compiled in.
You don't need, but wxWidgets functionality needs it for reading settings of OS.
metalogic wrote:If it shouldn't be tied to wxUSE_CONFIG I think it should have it's own #define.
Sources are open, editor in your hands and patch tracker available :-)
If you know how to modify rest of the wxWidgets code to work without wxRegKey class you can share it.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2

metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic » Mon May 09, 2005 4:04 pm

Thanks ABX for your answer.

Well, I simply removed registry.cpp from the library and everything compiled fine so I'm assuming there weren't any dependencies. I have undefined a lot of things since I am trying to get a very, very lean library so maybe in the process I undefined everything that depends on the registry.

I guess I could do a test by taking the plain vanilla library and just removing registry.cpp and see how that goes.

Might try that tonight.

Post Reply