Re: Source code size and debug disabled
From: Philip Taylor (philipjt_at_ntlworld.com)
Date: 10/30/04
- Next message: Anders Eriksson: "TRACE without the IDE?"
- Next in thread: Fred: "Re: Source code size and debug disabled"
- Reply: Fred: "Re: Source code size and debug disabled"
- Maybe reply: Fred: "Re: Source code size and debug disabled"
- Messages sorted by: [ date ] [ thread ]
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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
- Next message: Anders Eriksson: "TRACE without the IDE?"
- Next in thread: Fred: "Re: Source code size and debug disabled"
- Reply: Fred: "Re: Source code size and debug disabled"
- Maybe reply: Fred: "Re: Source code size and debug disabled"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|