質問する質問する
 

回答済みextern nesting issue

  • 2009年11月5日 22:45repressed ユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダルユーザーのメダル
     
    My team has a large solution (think a million+ of lines of C/C++ code) that we are porting from a non-MS environment to CE.  Since a lot of the header files are used by a mix of C and C++ most tend to have the classic

    #ifdef __cplusplus
    extern "C" {
    #endif
    ...
    #ifdef __cplusplus } #endif
    wrapping their entire contents.  The problem is that it appears that the microsoft compiler preprocessor doesn't handle extern nesting beyond a level of 10.  (See http://msdn.microsoft.com/en-us/library/ft39hh4x(VS.71).aspx.)  I'm not sure how many levels deep we need to go but it is clearly beyond this limit. 

    Short of touching a lot (and I do mean a lot) of header files, is there any way around this limit?  It looks like this is a hard coded limit in the tool but does anyone know if is there a registry key or preprocessor command that will override it?  Or does anyone know of a solution that won't involve touching a very large number of header files?

    (It also begs the question of why what is supposed to be a world class tool falls so far short of the recommended value of 1024 that the C++ standard specifies?)

回答

すべての返信