Here is the situation:
1) I Have a project "Proj" which is compiled "Release".
2) However, many of the routines which are called
are part of a "standard" MyStd.LIB file.
3) All of the routines in MyStd.LIB were compiled in a separate
project as "FullDebug", before being placed into the library file.
4) Project "Proj" links from MyStd.LIB.
5) There is an Access Violation Exception in one of the "standard"
routines.
6) Before running "Proj" from the IDE, I OPEN the file where the error
is located (NOTE: I DO NOT "Add" the routine).
7) Then I place a break in the error routine.
8) Control does not stop at the break. Why?
Richard
(PS. Thanks for the help last week)
|
Re: Debuging & *.LIB linking |
|
"Remy Lebeau (TeamB)" wrote in message
news:4772d6c5@newsgroups.borland.com...
>You need to compile both projects in Debug mode. Then the debugging
>symbols for "MyStd.lib" will be included in the TDS file that the IDE will
>use for debugging "Proj".
>
Alternatively, you may be able to simply modify your main program
project/options/linker/Linking parameters (I only have bds2006 available
currently) to specify "Full Debug Information (-v)".
If, however, your project depends on a set of (release) libraries that your
library also depends on (debug versions of), this will likely cause other
problems, and you'll need to do as Gambit originally suggested. (Say VCL,
as one example.)
Also, a long shot, but I have recently encountered a problem with some
similarity to yours (using bds2006), but having nothing to do with
release/debug - the cause turned out to be use of IO Stream facilities by
routines in the library, when no use of IO Stream facilities were made in
the program. Apparently the IO Stream facilities were not being initialized
properly, when only referenced from the library.
Adding a definition of an IOStream in the main program project (its not
actually used, other than being defined, and thus constructed) caused my
access violation to evaporate.
|
Re: Debuging & *.LIB linking |
|
"Richard" wrote in message
news:4772d007$1@newsgroups.borland.com...
> 1) I Have a project "Proj" which is compiled "Release".
> 3) All of the routines in MyStd.LIB were compiled in a separate
> project as "FullDebug", before being placed into the library file.
Don't mix Release and Debug code together. Compile everything for one or
the other, not both.
> 8) Control does not stop at the break. Why?
Because "Proj" was compiled for Release instead of Debug. You need to
compile both projects in Debug mode. Then the debugging symbols for
"MyStd.lib" will be included in the TDS file that the IDE will use for
debugging "Proj".
Gambit
|