[comp.lang.c] Problems with COdeView

nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) (11/29/89)

My main.c has the following layout:

#include "p1.c"
#include "p2.c"

VOID main()
{
 p1(..) ;
 p2(..) ;
}

I am trying to use CodeView for the first time and like the
documentation says I am using the /Zi /Od and /CO for the linker.
However when I invoke CodeView it displays the first included
procedure instead of my main.c I am able to tag line of p1.c using the
mouse however if I Open explicitly my main.c using the File Open
option I cannot click my mouse on any source line.

Yes I am including C procedures at the top of my main.c is there a
problem with this?

Thank you for any help.
--Abdenacer 	(nacer@hpmcaa.mcm.hp.COM)


BTW. I am using CVP under OS2 

fredex@cg-atla.UUCP (Fred Smith) (12/01/89)

In article <510006@hpmcaa.mcm.hp.com> nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) writes:
>My main.c has the following layout:
>
>#include "p1.c"
>#include "p2.c"
>
>VOID main()
>{
> p1(..) ;
> p2(..) ;
>}
>
>I am trying to use CodeView for the first time and like the
>documentation says I am using the /Zi /Od and /CO for the linker.
>However when I invoke CodeView it displays the first included
>procedure instead of my main.c I am able to tag line of p1.c using the
>mouse however if I Open explicitly my main.c using the File Open
>option I cannot click my mouse on any source line.
>

Try typing :

     g main

at the codeview command window and see if it will show you the source for main.


>Yes I am including C procedures at the top of my main.c is there a
>problem with this?


Well, this is certainly UNUSUAL C programming practice. This is (vritually)
never done! That is why God created linkers, after all (that's a joke, folks!),
so you can do separate compilation and link together multiple object files.

I would further guess (never having thought to try this) that this practice
is somehow the cause of Codeview's confusion over where your source is.


Fred Smith
uunet!samsung!cg-atla!fredex