I appreciate the help to everyone /w setting up the include dirs for
v2 of prc-tools. It finds things just great now. However, I still
can't build any of my apps on top of it. They consistently die shortly
into the app (infinite loop of some sort). It all seems related to globals.

As a general rule, I setup my globals as follows (which I don't see as
a problem):

In a "vars.h" header file:

extern VoidHand gvh;
extern gvtype *gv; /* gvtype is a structure that I've created elsewhere */

Then in the main app's .c file:

VoidHand gvh;
gvtype *gv;

Then in the app, simply:

gvh = MemHandleNew (sizeof(gvtype));
gv = MemHandleLock (gvh);
/* With appropriate error checking */

Then access to globals is gv-><whatever> ... this has worked fine in the
past.

However, this seems to be the source of problems in prc-tools v2, so I'm
going to play dumb and ask, what's the CORRECT way of setting up globals
in prc-tools v2 apps?

Or am I just seeing this wrong and the error lay elsewhere?

I'm having this problem on both Windows and Linux (built from scratch)
versions
of prc-tools v2...







>Chris DiPierro <[EMAIL PROTECTED]> wrote in message
>news:2591@palm-dev-forum...

> First problem to solve is why it can't find my header files. I
> have the following dir structure:

>See the following extract from a message a cuple of weeks ago by John
>Marshall at pilot.programmer.gcc (repeated here because news.massena.com
>appears to be off the air at the moment).

><quote on>
>Your PalmDev tree should look like this:

>d:\programming\palm\palmdev\sdk-3.1
>d:\programming\palm\palmdev\sdk-3.1\include
>d:\programming\palm\palmdev\sdk-3.1\include\Core
>d:\programming\palm\palmdev\sdk-3.1\include\Core\Hardware
>d:\programming\palm\palmdev\sdk-3.1\include\Core\International
>d:\programming\palm\palmdev\sdk-3.1\include\Core\System
>d:\programming\palm\palmdev\sdk-3.1\include\Core\System\Unix
>d:\programming\palm\palmdev\sdk-3.1\include\Core\UI
>[similarly ...\palm\palmdev\sdk-1\... etc for whatever SDKs you installed]
>d:\programming\palm\palmdev\include
>d:\programming\palm\palmdev\lib
>d:\programming\palm\palmdev\lib\m68k-palmos-coff
>d:\programming\palm\palmdev\doc
>[...]

>You shouldn't need to move any of the files around.  The `-v' and `-H'
>compiler options are useful for checking your setup.

>$ echo | m68k-palmos-gcc -E -v - -palmos3.1

>will give a list of all the include directories the compiler is looking in,
>and should give all the directories above with `include' in their names, in
>some order.  You probably want to pick up one of the SDKs by default
instead
>of using a `-palmosX' option all the time, so you can follow the
>instructions
>in the README to make a `sdk' symlink.
><quote off>

>It worked for me!

Regards, Nick




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to