Author Topic: Mac Binaries  (Read 83307 times)

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #45 on: April 29, 2006, 02:59:17 pm »
scintilla ends up being a .dll on windows, so I assumed it needed -dynamic on the MAC. 

Is -dynamic correct for wxscintilla ?

Sorry for being so confused, -dynamic is correct for libwxscintilla.dylib

-bundle is used for the plugins of C::B, share/codeblocks/plugins

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #46 on: April 29, 2006, 03:26:21 pm »
scintilla ends up being a .dll on windows, so I assumed it needed -dynamic on the MAC. 

Is -dynamic correct for wxscintilla ?

Sorry for being so confused, -dynamic is correct for libwxscintilla.dylib

-bundle is used for the plugins of C::B, share/codeblocks/plugins

Ok, in that case it would sure be nice to have the .cbp override the compiler option.

Yiannis, how can we put (in the .cbp) -dynamic for core/sdk and -bundle for plugins/contribs ?

thanks
pecan

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Mac Binaries
« Reply #47 on: April 29, 2006, 04:18:25 pm »
Quote
Yiannis, how can we put (in the .cbp) -dynamic for core/sdk and -bundle for plugins/contribs ?

In the respective targets' other linker options.
Be patient!
This bug will be fixed soon...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #48 on: April 29, 2006, 10:47:43 pm »

EDIT: finally figured out I should use libtool on the Mac, not ld
   Will leave this message for the benefit of others.
//----------------------------------------------------------------------

This is the result of compiling scintilla under MAC CodeBlocks with the Linux codeblocks-unix.cbp

Would anyone venture to point me in the direction as to what to do about this?
 
Code
g++ -dynamic -Lsdk/tinyxml -L/usr/lib  .objs/sdk/wxscintilla/src/wxscintilla.o .
objs/sdk/wxscintilla/src/ScintillaWX.o .objs/sdk/wxscintilla/src/scintilla/src/A
utoComplete.o .objs/sdk/wxscintilla/src/scintilla/src/CallTip.o .objs/sdk/wxscin
tilla/src/scintilla/src/CellBuffer.o .objs/sdk/wxscintilla/src/scintilla/src/Con
tractionState.o .objs/sdk/wxscintilla/src/scintilla/src/Document.o .objs/sdk/wxs
cintilla/src/scintilla/src/DocumentAccessor.o .objs/sdk/wxscintilla/src/scintill
a/src/Editor.o .objs/sdk/wxscintilla/src/scintilla/src/ExternalLexer.o .objs/sdk
/wxscintilla/src/scintilla/src/Indicator.o .objs/sdk/wxscintilla/src/scintilla/s
rc/KeyMap.o .objs/sdk/wxscintilla/src/scintilla/src/KeyWords.o .objs/sdk/wxscint
illa/src/scintilla/src/LexAPDL.o .objs/sdk/wxscintilla/src/scintilla/src/LexAU3.
o .objs/sdk/wxscintilla/src/scintilla/src/LexAVE.o .objs/sdk/wxscintilla/src/sci
ntilla/src/LexAda.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsm.o .objs/sdk/w
xscintilla/src/scintilla/src/LexAsn1.o .objs/sdk/wxscintilla/sr\
ld: Undefined symbols:\
_main\
Process terminated with status 1 (12 minutes, 37 seconds)\

thanks
pecan

Anders, could you attach your make file to a message here?
thanks
« Last Edit: April 30, 2006, 02:06:19 am by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #49 on: April 30, 2006, 02:13:18 am »
EDIT: 2006/04/30
This macro error was caused by an editing fault (human or otherwise)
// -----------------------------------------------------------------------

There is an advanced linker option for making dynamic libs in CodeBlocks:
Code
$linker -dynamic $libdirs $link_objects $link_resobjects -o $exe_output $link_options  $libslibtooll

For the Mac, I changed $linker to libtool. When running this line against the scintilla target, I get the following:
Code
-------------- Build: AutoRevision in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: ConsoleRunner in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: tinyXML in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: AngelScript in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: scintilla in Code::Blocks - Unix ---------------
libtool -dynamic -Lsdk/tinyxml -L/usr/lib  .objs/sdk/wxscintilla/src/wxscintilla.o .objs/sdk/wxscintilla/src/ScintillaWX.o .objs/sdk/wxscintilla/src/scintilla/src/AutoComplete.o .objs/sdk/wxscintilla/src/scintilla/src/CallTip.o .objs/sdk/wxscintilla/src/scintilla/src/CellBuffer.o .objs/sdk/wxscintilla/src/scintilla/src/ContractionState.o .objs/sdk/wxscintilla/src/scintilla/src/Document.o .objs/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.o .objs/sdk/wxscintilla/src/scintilla/src/Editor.o .objs/sdk/wxscintilla/src/scintilla/src/ExternalLexer.o .objs/sdk/wxscintilla/src/scintilla/src/Indicator.o .objs/sdk/wxscintilla/src/scintilla/src/KeyMap.o .objs/sdk/wxscintilla/src/scintilla/src/KeyWords.o .objs/sdk/wxscintilla/src/scintilla/src/LexAPDL.o .objs/sdk/wxscintilla/src/scintilla/src/LexAU3.o .objs/sdk/wxscintilla/src/scintilla/src/LexAVE.o .objs/sdk/wxscintilla/src/scintilla/src/LexAda.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsm.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsn1.o .objs/sdk/wxscintill
libtool: can't open file: libtooll (No such file or directory)
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings

If I remove $libslibtooll from the advanced linker options, I get the following:
Code

-------------- Build: AutoRevision in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: ConsoleRunner in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: tinyXML in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: AngelScript in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: scintilla in Code::Blocks - Unix ---------------
libtool -dynamic -Lsdk/tinyxml -L/usr/lib  .objs/sdk/wxscintilla/src/wxscintilla.o .objs/sdk/wxscintilla/src/ScintillaWX.o .objs/sdk/wxscintilla/src/scintilla/src/AutoComplete.o .objs/sdk/wxscintilla/src/scintilla/src/CallTip.o .objs/sdk/wxscintilla/src/scintilla/src/CellBuffer.o .objs/sdk/wxscintilla/src/scintilla/src/ContractionState.o .objs/sdk/wxscintilla/src/scintilla/src/Document.o .objs/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.o .objs/sdk/wxscintilla/src/scintilla/src/Editor.o .objs/sdk/wxscintilla/src/scintilla/src/ExternalLexer.o .objs/sdk/wxscintilla/src/scintilla/src/Indicator.o .objs/sdk/wxscintilla/src/scintilla/src/KeyMap.o .objs/sdk/wxscintilla/src/scintilla/src/KeyWords.o .objs/sdk/wxscintilla/src/scintilla/src/LexAPDL.o .objs/sdk/wxscintilla/src/scintilla/src/LexAU3.o .objs/sdk/wxscintilla/src/scintilla/src/LexAVE.o .objs/sdk/wxscintilla/src/scintilla/src/LexAda.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsm.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsn1.o .objs/sdk/wxscintill
libtool: internal link edit command failed
ld: for architecture ppc
ld: Undefined symbols:
__Unwind_Resume
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZdaPv
__ZdlPv
__Znam
__Znwm
___gxx_personality_v0
___cxa_pure_virtual
__ZTVN10__cxxabiv121__vmi_class_type_infoE
Process terminated with status 1 (0 minutes, 46 seconds)
0 errors, 0 warnings

Where is $libslibtooll defined ?

Anyone have some advice for me ?  I'm ready for some...

thanks
pecan
« Last Edit: April 30, 2006, 04:57:28 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #50 on: April 30, 2006, 04:53:07 pm »
There is an advanced linker option for making dynamic libs in CodeBlocks:
Code
$linker -dynamic $libdirs $link_objects $link_resobjects -o $exe_output $link_options  $libslibtooll

The above is a bogus error. It happened when I editited the line within advanced options.
Somehow "slibtooll/n/t" got appended to the macro line. From now on I'll edit the  .conf directly. (don't know if this was human or code bug..it can wait )

However, I am still getting the following error:
Code
-------------- Build: AutoRevision in Code::Blocks - Unix ---------------
Target is up to date.
-------------- Build: ConsoleRunner in Code::Blocks - Unix ---------------
Target is up to date.
-------------- Build: tinyXML in Code::Blocks - Unix ---------------
Target is up to date.
-------------- Build: AngelScript in Code::Blocks - Unix ---------------
Target is up to date.

-------------- Build: scintilla in Code::Blocks - Unix ---------------
libtool -dynamic -Lsdk/tinyxml -L/usr/lib  .objs/sdk/wxscintilla/src/wxscintilla.o .objs/sdk/wxscintilla/src/ScintillaWX.o .objs/sdk/wxscintilla/src/scintilla/src/AutoComplete.o .objs/sdk/wxscintilla/src/scintilla/src/CallTip.o .objs/sdk/wxscintilla/src/scintilla/src/CellBuffer.o .objs/sdk/wxscintilla/src/scintilla/src/ContractionState.o .objs/sdk/wxscintilla/src/scintilla/src/Document.o .objs/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.o .objs/sdk/wxscintilla/src/scintilla/src/Editor.o .objs/sdk/wxscintilla/src/scintilla/src/ExternalLexer.o .objs/sdk/wxscintilla/src/scintilla/src/Indicator.o .objs/sdk/wxscintilla/src/scintilla/src/KeyMap.o .objs/sdk/wxscintilla/src/scintilla/src/KeyWords.o .objs/sdk/wxscintilla/src/scintilla/src/LexAPDL.o .objs/sdk/wxscintilla/src/scintilla/src/LexAU3.o .objs/sdk/wxscintilla/src/scintilla/src/LexAVE.o .objs/sdk/wxscintilla/src/scintilla/src/LexAda.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsm.o .objs/sdk/wxscintilla/src/scintilla/src/LexAsn1.o .objs/sdk/wxscintill
libtool: internal link edit command failed
ld: for architecture ppc
ld: Undefined symbols:
__Unwind_Resume
__ZTVN10__cxxabiv117__class_type_infoE
__ZTVN10__cxxabiv120__si_class_type_infoE
__ZdaPv
__ZdlPv
__Znam
__Znwm
___gxx_personality_v0
___cxa_pure_virtual
__ZTVN10__cxxabiv121__vmi_class_type_infoE
Process terminated with status 1 (0 minutes, 45 seconds)
0 errors, 0 warnings

Anders, we sure would like a look at that make file. :)
« Last Edit: April 30, 2006, 04:55:49 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #51 on: April 30, 2006, 08:44:08 pm »
MyGod! I can't believe it. scintilla actually linked under OS X 10.3
as shown here:
Code
libtool -dynamic -Lsdk/tinyxml -L/usr/lib -L/usr/local/lib -L/usr/lib/gcc/darwin/3.3 -L/usr/lib/gcc/darwin/default -L/usr/lib  .objs/sdk/wxscintilla/src/wxscintilla.o .objs/sdk/wxscintilla/src/ScintillaWX.o .objs/sdk/wxscintilla/src/scintilla/src/AutoComplete.o .objs/sdk/wxscintilla/src/scintilla/src/CallTip.o .objs/sdk/wxscintilla/src/scintilla/src/CellBuffer.o .objs/sdk/wxscintilla/src/scintilla/src/ContractionState.o .objs/sdk/wxscintilla/src/scintilla/src/Document.o .objs/sdk/wxscintilla/src/scintilla/src/DocumentAccessor.o .objs/sdk/wxscintilla/src/scintilla/src/Editor.o .objs/sdk/wxscintilla/src/scintilla/src/ExternalLexer.o .objs/sdk/wxscintilla/src/scintilla/src/Indicator.o .objs/sdk/wxscintilla/src/scintilla/src/KeyMap.o .objs/sdk/wxscintilla/src/scintilla/src/KeyWords.o .objs/sdk/wxscintilla/src/scintilla/src/LexAPDL.o .objs/sdk/wxscintilla/src/scintilla/src/LexAU3.o .objs/sdk/wxscintilla/src/scintilla/src/LexAVE.o .objs/sdk/wxscintilla/src/scintilla/src/LexAda.o .objs/sdk/wxscintilla/src/scintilla
Process terminated with status 0 (7 minutes, 47 seconds)
0 errors, 0 warnings

I still don't know if I've picked the correct libs. But this is what worked. I'd appreciate any Mac types comment on the lib lists. Would you compare it to your make file. Maybe even upload your make file... :lol: :lol:

Code
            <Target title="scintilla">
                <Option output="devel/libwxscintilla.so" />
                <Option working_dir="devel" />
                <Option type="3" />
                <Option compiler="gcc" />
                <Option includeInTargetAll="1" />
                <Compiler>
                    <Add option="-DSCI_LEXER" />
                    <Add option="-DLINK_LEXERS" />
                    <Add option="-DGTK" />
                    <Add directory="sdk/wxscintilla/include" />
                    <Add directory="sdk/wxscintilla/src/scintilla/include" />
                    <Add directory="sdk/wxscintilla/src/scintilla/src" />
                </Compiler>
                <ResourceCompiler>
                    <Add directory="sdk/wxscintilla/include" />
                </ResourceCompiler>
                <Linker>
                    <Add option="`wx-config --libs`" />
                    <!--Add library="addhere" /-->
                    <Add library="/usr/lib/libSystem.B.dylib" />
                    <Add library="/usr/lib/libSystem.dylib" />
                    <Add library="/usr/lib/gcc/darwin/3.3/libstdc++.a" />
                    <Add library="/usr/lib/gcc/darwin/3.3/libgcc.a" />
                    <!--Add library="/usr/local/lib/libwx_mac-2.6.0.dylib" /-->
                    <Add directory="/usr/lib" />
                    <Add directory="/usr/local/lib" />
                    <Add directory="/usr/lib/gcc/darwin/3.3" />
                    <Add directory="/usr/lib/gcc/darwin/default" />
                </Linker>
            </Target>


pecan
« Last Edit: May 01, 2006, 02:15:57 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #52 on: April 30, 2006, 11:59:16 pm »
While compiling the sdk for "MacCodeBlocks", finddlg.cpp got a bunch of errors because it couldn't see the header files.

I defined "#undef CB_PRECOMP" ahead of the #ifdef CB_PRECOMP and it compiled nicely.

EDIT: 2006/05/1
The above is also true of replacedlg.cpp

I had set "pecomp headers in directory along sideof..." option long ago.

Why is this happening. Is there anything I can do about it. I'd like to get that #undef out of there.

I also noticed that setting "along side of" option did not change the
entry for finddlg...
Code
		<Unit filename="sdk\filegroupsandmasks.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="sdk" />
</Unit>
<Unit filename="sdk\finddlg.cpp">
<Option compilerVar="CPP" />
<Option target="sdk" />
</Unit>
<Unit filename="sdk\finddlg.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="sdk" />


Is this significant ?

thanks
pecan
« Last Edit: May 01, 2006, 07:34:18 pm by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #53 on: May 01, 2006, 07:44:33 pm »
sdk now compiles/links under mcCodeBlocks.
Note: This is not a definitive solution. At the moment it's still "trial" and error

Modifications necessary:

* cp src/devel/libwxscintilla.so src/devel/libwxscintilla.dylib
  This should have been output as a dylib in the first place.

* modify .cbp under  <Target title="sdk">
Code
              <Linker>
                     ...
                    <!-- Additional libs and dirs for mcCodeBlocks -->
                    <Add library="/usr/lib/libSystem.B.dylib" />
                    <Add library="/usr/lib/libSystem.dylib" />
                    <Add library="/usr/lib/gcc/darwin/3.3/libstdc++.a" />
                    <Add library="/usr/lib/gcc/darwin/3.3/libgcc.a" />
                    <Add directory="/usr/lib" />
                    <Add directory="/usr/local/lib" />
                    <Add directory="/usr/lib/gcc/darwin/3.3" />
                    <Add directory="/usr/lib/gcc/darwin/default" />
                </Linker>
 
Code
-------------- Build: sdk in Code::Blocks - Unix ---------------
Running target pre-build steps
tools/autorevision/auto_revision +wx +int +t . sdk/autorevision.h
libtool -dynamic -Lsdk/tinyxml -Ldevel -Lsdk/as -Lsdk/propgrid -Lsdk/wxFlatNotebook -L/usr/lib -L/usr/local/lib -L/usr/lib/gcc/darwin/3.3 -L/usr/lib/gcc/darwin/default -L/usr/lib  .objs/sdk/xtra_res.o .objs/sdk/as/bindings/const_bindings.o .objs/sdk/as/bindings/sc_io.o .objs/sdk/as/bindings/sc_wxarraystring.o .objs/sdk/as/bindings/sc_wxstring.o .objs/sdk/as/bindings/scriptbindings.o .objs/sdk/autodetectcompilers.o .objs/sdk/base64.o .objs/sdk/blockallocated.o .objs/sdk/cbeditor.o .objs/sdk/cbeditorprintout.o .objs/sdk/cbexception.o .objs/sdk/cbplugin.o .objs/sdk/cbproject.o .objs/sdk/cbthreadpool.o .objs/sdk/cbworkspace.o .objs/sdk/compileoptionsbase.o .objs/sdk/compiler.o .objs/sdk/compilercommandgenerator.o .objs/sdk/compilerfactory.o .objs/sdk/compileroptions.o .objs/sdk/compiletargetbase.o .objs/sdk/configmanager-revision.o .objs/sdk/configmanager.o .objs/sdk/configurationpanel.o .objs/sdk/configuretoolsdlg.o .objs/sdk/confirmreplacedlg.o .objs/sdk/crc32.o .objs/sdk/devcpploader.o .objs/sdk/editarrayfile
Process terminated with status 0 (5 minutes, 42 seconds)
0 errors, 0 warnings

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Mac Binaries
« Reply #54 on: May 03, 2006, 11:06:49 pm »
Finally, a macCodeBlocks thats usable.

It has problems with AngelScript, and I haven't tried the contribs yet. But this version was created from a hand written CodeBlocks-mac-cbp.

I'm waiting for a makefile to check and modify the .cbp. I have all notes for necessary changes and will make a .patch.



thanks
pecan


EDIT: btw, except for the startup, with all those lexers loading, it's quite spritely (as the elders say) on a imacg3 with only 128meg.
« Last Edit: May 03, 2006, 11:11:19 pm by Pecan »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #55 on: May 03, 2006, 11:13:03 pm »
Finally, a macCodeBlocks thats usable.

It has problems with AngelScript, and I haven't tried the contribs yet.

Looks great, I'm trying to build with SVN and wxWidgets 2.6.3, then send to you.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Mac Binaries
« Reply #56 on: May 04, 2006, 08:40:18 am »
Amazing work Pecan :lol:
Be patient!
This bug will be fixed soon...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #57 on: May 04, 2006, 09:12:56 am »
I still don't know if I've picked the correct libs. But this is what worked. I'd appreciate any Mac types comment on the lib lists. Would you compare it to your make file. Maybe even upload your make file... :lol: :lol:

You shouldn't need to add /usr/lib or /usr/local/lib to the search paths, I think ?

Linking with C++ is something of a pain, but "generally" -lstdc++ should do (without having to add any compiler paths). However, on Mac OS X 10.3– (only) you also need to link with libgcc.a too. But you do not need to do so on Mac OS X 10.4+

In another project I am using GNU Makefile code like:
Code
LDFLAGS = `wx-config --libs` -lstdc++ `test -r /usr/lib/libcc_dynamic.a && echo -lcc_dynamic`
i.e. link with libcc_dynamic.a, but only if it it exists...
« Last Edit: May 04, 2006, 09:16:15 am by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Mac Binaries
« Reply #58 on: May 04, 2006, 09:34:05 am »
While compiling the sdk for "MacCodeBlocks", finddlg.cpp got a bunch of errors because it couldn't see the header files.

I defined "#undef CB_PRECOMP" ahead of the #ifdef CB_PRECOMP and it compiled nicely.
...
Why is this happening. Is there anything I can do about it. I'd like to get that #undef out of there.

It seems like a bunch of the new code is using "CB_PRECOMP", without first including the file where it is properly defined (that would be "sdk_precomp.h") This makes it fail on the Mac, since it disables CB_PRECOMP with GCC 3.3 in that header file - for some obscure reason (Apple's GCC 3.3 supports precomp, so the check is probably broken?).

Code
#ifdef __GNUC__
    #if ( (__GNUC__ < 3) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) ) )
        #undef CB_PRECOMP
    #endif
#endif

In order to work properly, the canonical way of writing the includes should be:

Code
* $Id$
* $HeadURL$
*/

#include "sdk_precomp.h"

#if CB_PRECOMP
#include "sdk.h"
#else

Bug report on this coming, once the build is complete (and thus the diff too)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Mac Binaries
« Reply #59 on: May 04, 2006, 10:10:37 am »
first : sdk_precomp.h -> sdk_common.h

Usage for including headers, should be something like this :

#ifdef CB_PRECOMP
#include "sdh.h" // precompiled header supported platform
#else
# include headers we need here and that are part of sdk.h (sdk_common.h)
#endif
# include headers we need here and that are NOT part of sdk.h (sdk_common.h)

CB_PRECOMP should be defined on the make file level or cbp level or should we include a special header for that , like sdk_common.h.

Note that sdk_common.h has different responsibilities now : in case of no precompiled headers (at all : so also no "WX_PRECOMP", causing an include of "#include <wx/wx.h>" and even always includes "#include <wx/wxprec.h>". This brings a whole lot of wx stuff in the current translation unit that will not be needed. It is better to explicitly specify what you need (that makes things clear) then to rely upon the fact that stuff might come in through some other deeply nested headers.

Seems in case of header definition (or undef) of CB_PRECOMP we need just a little header for that.


So something like this would be the template for including (usage in cpp files, don't use this in headers)
Code
#include "cb_precomp_determining_header_goes_here"
#ifdef CB_PRECOMP
#include "sdh.h" // precompiled header supported platform
#else
# include headers we need here and that are part of sdk.h (sdk_common.h)
#endif
# include headers we need here and that are NOT part of sdk.h (sdk_common.h)
« Last Edit: May 04, 2006, 10:22:54 am by killerbot »