Re: Stripping out unused code from linked static library
Re: Stripping out unused code from linked static library
- Subject: Re: Stripping out unused code from linked static library
- From: Dimitri Schoolwerth <email@hidden>
- Date: Sat, 02 Apr 2011 20:19:05 +0400
On Sat, Apr 2, 2011 at 7:04 PM, Darrell Blake <email@hidden> wrote:
>> My wxWidgets apps are around 20-25 MB using wx 2.9 (x86_64+i386+PPC,
>> using Cocoa) and 10-15 MB with wx 2.8 (i386+PPC, using Carbon).
>> If you're on wxWidgets 2.9+ asserts by default are always enabled. In
>> your wx/setup.h you might then want to set wxDEBUG_LEVEL to 0 for
>> Release mode. Disabling features such as XRC and AUI may also help if
>> you don't use them. Furthermore I have these in my .xcconfig file for
>> Release mode:
>
> Yeah, I'm actually using the SVN trunk so it'll definitely be 2.9. I
> can't find the setup.h file you're referring to, though. From a fresh
> checkout I can only see include/msvc/wx/setup.h and
> include/wx/msw/setup.h which are both Windows related.
SVN checkouts don't contain setup.h files (downloadable releases do),
except the useful helper setup.h for building with MS Visual Studio in
include/msvc/wx/. Instead checkouts have setup0.h which are copied and
renamed to setup.h. In the case of using configure-based building this
is not needed. If you feel more comfortable with an IDE you can also
take a look at build/osx/readme.txt for creating Xcode project files
(for Cocoa/iOS/Carbon) for the wx library (in that case you should
work with include/wx/osx/setup.h).
> This in the line I'm using to configure wxWidgets:
>
> ./configure --prefix=/usr/local
> --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk
> --with-macosx-version-min=10.5 --with-osx_cocoa --disable-shared
> --enable-universal-binary
As a side note: If you actually do have the 10.6 SDK I recommend you
use that (maybe just remove the --with-macosx-sdk option to use the
latest on the system?). wx takes run-time care of not using features
that are not available on earlier systems.
> Actually, just noticed that the above has created
> lib/wx/include/osx_cocoa-unicode-static-2.9/wx/setup.h. Is this what
> you are referring to? Though I've just opened it up and it doesn't
> seem to contain wxDEBUG_LEVEL...
This is the setup.h that configure creates. You could edit either that
one or setup.h.in which configure uses to create setup.h (don't forget
to run configure again). You can add any missing sections yourself.
See include/wx/osx/setup0.h as an example for wxDEBUG_LEVEL.
Also make sure you are using the output of wx-config --cxxflags so
that the setup.h at lib/ is used instead of any stray ones somewhere
in include/wx/.
Regards,
Dimitri
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden