compiling c application to prc (palm) tool

P

p.s.bijpost

Hello all:

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

Who can help?

Thanks&regards,
Paul
 
J

jacob navia

Hello all:

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

Who can help?

Thanks&regards,
Paul

In line 810 the program IP1kC.c is dereferencing (i.e.
accessing the fields of a structure/union) to a type
that is not fully defined.

For instance when you write:

struct foo *FooPtr;

WITHOUT defining struct foo, you have an INCOMPLETE definition of
that type.

Solution:

Provide the definition.

P.S. The problem with source code distributing is that you have
to know what you are doing to be useful.

jacob
 
P

p.s.bijpost

Hello all:
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
If I compile with the original source files thers's no problem, I get
a "fresh"prcapp.
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 usingPRCtools//Xcodemac OSX
Who can help?
Thanks&regards,
Paul

In line 810 the program IP1kC.c is dereferencing (i.e.
accessing the fields of a structure/union) to a type
that is not fully defined.

For instance when you write:

struct foo *FooPtr;

WITHOUT defining struct foo, you have an INCOMPLETE definition of
that type.

Solution:

Provide the definition.

P.S. The problem with source code distributing is that you have
to know what you are doing to be useful.

jacob

Hello Jacob,

Thanks for the info I'll look into that.
The strange thing is that when I compile with the original sources
(and the original .c file) all is fine BUT as soon as I just open
de .c file in Xcode and save it again (without any editing) I'm in
trouble.

You should say nothing changed at all ,except for the creation date of
the file...

If I look into the old and new .c file with hexedit there's no
difference at all.
I'm puzzled.

rgrds!
Paul
 
D

David Tiktin

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

Could you be having a problem with different end-of-line characters
inserted by your editor confusing the compiler?

Dave
 
P

p.s.bijpost

Thanks for thinking with me Dave.
The fact that a re-save of the unaltered .c file doesn't work makes me
think of this too but how do I check or fix this end-of-line problem?

regards,
Paul


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
If I compile with the original source files thers's no problem, I
get a "fresh"prcapp.
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 usingPRCtools//Xcodemac OSX

Could you be having a problem with different end-of-line characters
inserted by your editor confusing the compiler?

Dave


The fact that a re-save of the unaltered .c file doesn't work makes me
think of this too but how do I check or fix this?
 
K

Keith Thompson

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.
 
D

David Tiktin

The fact that a re-save of the unaltered .c file doesn't work
makes me think of this too but how do I check or fix this
end-of-line problem?

OS X should have a hexdump utility. Or try saving the file with a
different name with your editor and diff the files. I'm not sure what
kind of EOLs m68k-palmos-gcc is expecting, but you can use sed or perl
to convert them to whatever they need to be. If they're not MAC EOLs,
you can add this step part of your make procedure.

Dave
 
P

p.s.bijpost

Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>

Dear All,

I succeeded. Deleted part of the faulty line810 and with trial&error
got it to compile without errors.
Thanks all for thinking with me.

Best regards,
Paul
 
C

CBFalconer

I succeeded. Deleted part of the faulty line810 and with trial&error
got it to compile without errors. Thanks all for thinking with me.

Good for you. You have posting in order. We will make a proper
Usenetter out of you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top