p.*********@gmail.com writes:
I'm trying to edit a little (freeware) palm app to my wishes but run
into problems as soon as re-save the original .c file. During compile
("make" in terminal)I get:
-------------------------------------------------
m68k-palmos-gcc -O2 -c IP1kC.c -o IP1kC.o
IP1kC.c: In function `MenuIsVisible':
IP1kC.c:810: dereferencing pointer to incomplete type
make: *** [IP1kC.o] Error 1
-------------------------------------------------------
Even if I didn't change anything in the .c file!!
If I compile with the original source files thers's no problem, I get
a "fresh" prc app.
Just the fact that the .c file is "refreshed" is creating the problem.
The alterations I make in the .c file all pass correctly....
I'm using PRC tools//Xcode mac OSX
This is somewhat off-topic, but the "make" program avoids compiling
things that don't need to be compiled. For example, suppose you have
a source file "foo.c", to be compiled via "gcc -c foo.c" creating
"foo.o". If the Makefile is set up properly, and if "foo.o" exists
and is newer than "foo.c", then typing "make" won't bother to
recompile "foo.c".
But even if "foo.o" exists, there's no guarantee that "foo.c" is
valid. The make command works by checking dependencies, but it can
only check the dependencies it knows about. In this case, it probably
knows that foo.o depends on foo.c, but it doesn't know (or care) that
foo.o also depends on your compiler. "make clean" *usually* deletes
everything but the source files, but that has to be defined properly.
My guess (and it's nothing more than a guess) is that the distributed
application includes a copy of the generated object file along with
the corresponding source file, perhaps compiled a different compiler
that didn't complain about the error you're seeing. By refreshing the
source file you're forcing it to be recompiled with *your* compiler,
which rejects it.
But that's just one possibility.
I said this is off-topic because "make" is not part of the C
programming language, the topic of this newsgroup. However it's
likely that your underlying problem does have to do with C. But we
can't tell what it is without seeing your source code. Please don't
post all 810+ lines of it here.
Your best bet is probably to contact the original author or to try a
Google search. Failing that, you might be able to fix the software
yourself, or tweak your compiler settings so it compiles. Or you can
ask in comp.sys.palmtops.pilot (providing a pointer to the application
you're trying to build); maybe somebody else has had the same problem.
If you can narrow the problem down to a *small* *complete* program, we
can probably help.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"