Re: Source code size and debug disabled

From: Philip Taylor (philipjt_at_ntlworld.com)
Date: 10/30/04


Date: Sat, 30 Oct 2004 21:03:37 GMT

Out of curiosity, why would you want to have a file of this number of code
lines?

>From a code maintenance point of view this would be an absolute nightmare to
maintain. Having followed the thread, I can't see you making any statement
as to what language the code is written in. Since the C compiler is
different to the C++ compiler, could this be a feature introduced by the
compiler rather than the linker?

My suggestion would be to split the one huge file down into a number of more
manageable chunks - say no more than 2000 lines per file excluding include
files. Even 2000 is probably too high (this is code only, not code and
comment lines). Pre C++, my company guidelines suggested suggested no more
than 200 lines of C code per file which seems at first to be ridicous, but
actually turned out to be a bit high on average. Using C++, there is no
suggested limit but I rarely find files execeeding 4000 lines code/comment
lines. I have no idea how many lines are introduced by MFC include files,
but they must add a fair few lines as well. My code mixes MFC and STL, and I
have yet to be unlucky enough to hit your problem. Perhaps it is somehow a
feature of producing a lib rather than a dll. As I vaguely recall, my one
brief experiment with LIB files failed when mixed with precompiled headers
in a workspace composed of separate dependent projects. This may be another
feature and nothing to do with your problem.

Good luck in your endeavours

Phil (using VC++ 6 with SP6)

"Fred" <Fred@discussions.microsoft.com> wrote in message
news:B7CB655D-79E5-4898-BB05-CE455ABA6B17@microsoft.com...
>
> Thanks again Oleg for wasting time on my prob.
> I've tried to split the file in 2 part but the problem remains. In fact
> it's worst because I need to have the "includes" part in both files...
> So I don't know if the limit is for a file or for project (lib) .
> Perhaps I near the limit just with the includes....
>
> Do you know a way to generate the file to be proceeded by the compilater
> after pre-compiled step.... I mean the file file with both includes
> and
> my code in it ... ?
>
> Fred
>
>
> "Oleg Starodumov" wrote:
>
>>
>> Yes, I can reproduce it. There is a clear limit on the number of lines
>> in one source file (between 30000 - 40000 on VC6, not including
>> comments).
>> After the limit source line information is not available.
>>
>> Probably you can try to solve it by moving some code to other source
>> files.
>>
>> Regards,
>> Oleg
>>
>>
>>
>>
>>
>>
>>
>>
>>
>



Relevant Pages

  • Re: Partial string loss with sprintf/strcat
    ... As already suggested collecting information about the ... The stack and heap size ... A good suggestion but it's been years since I inspected assembler level ... compiler" that compiles to EM byte-code. ...
    (comp.lang.c)
  • Re: Language features worth proposing
    ... Some directive to disallow implicit external procedures. ... one could argue that a compiler flag to do this is ... partly because string conversion is 'fuzzy'. ... for some pet feature to be added. ...
    (comp.lang.fortran)
  • Re: cross-reference of Office 2003 programs menu, sub-menu and to
    ... "commenting on a feature in a product that anyone who has actually seen ... > Having read the presentation Beyond Menus and Toolbars in Microsoft Office ... > designer for the Office UI suite, and learnt that the menu interface had ... Your suggestion will be ...
    (microsoft.public.office.misc)
  • Re: c++ interpreter
    ... I didn't say it wasn't a feature. ... the setup to the bug ... - Automatically Execute tests on Save ... > unless your compiler builds an executable w/ errors, ...
    (comp.lang.cpp)
  • Re: The coming death of all RISC chips.
    ... "Don't do in hardware what can be done in the compiler". ... where software pipelining helped, the Itaniums shone. ... and that the now-dominating SIMD approach ... general-purpose feature SIMD seems less useful than the IA-64 ...
    (comp.arch)