ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple source problem?


From: Tamas Varga
Subject: Multiple source problem?
Date: Fri, 09 Feb 2001 11:31:51 +0100

Dear DDDers,

I don't whether this is normal behaviour (due to my lacking knowledge) or
there
is something strange in DDD when the executable code is linked from multiple

object files. Only the source file containing the main() function is listed
in the
source window, all other sources are invisible. Furthermore they are not
listed in
the "open sources" dialog. Could somebody comment on this?

There are three source files, first.cc and second.cc implement some classes
while
main.cc uses it. I compile them in this way (via Makefile):
gcc -g3 -c first.cc
gcc -g3 -c second.cc
gcc -g3 -c main.cc
gcc -g3 -o main first.o second.o main.o
Afterwards by running 'ddd main' I cannot see the source of first.cc and
second.cc
when I step into a function which is implented in those files.

To overcome the problem, I made a dirty hack, and I included the .cc files
in the
beginning of main.cc:
#include <stdio.h>
#include "first.cc"
#include "second.cc"
Therefore I got a single source object and everyting works fine. But the
modularity
is lost, and compilation time is always long. It is obvious that large
projects cannot
be debugged in this way.

Have you experienced such problem, or do you have any other suggestion to
avoid
this latter dirty hacking?

/Tamas

--
Tamas VARGA - PhD Student
  Budapest University of Technology and Economics   phone: +36-1-437-7087
   High Speed Networks Laboratory         http://hsnlab.ttt.bme.hu/~varga
  ERICSSON Hungary, Traffic Lab     mailto:address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]