compile error in isapnp-tools

Donnie Roos dr at kaneda.demon.nl
Mon Nov 13 01:10:31 PST 2000


At 12:32 AM 11/13/00 +0100, you wrote:

>Nope... contrary to my earlier report, it does not work ;-(
>It compiles ok, but running pnpdump results in a 'segmenation fault'
>(is that a bad thing ?)
>Anyone more ideas? TIA, Lukas.

The supplied solution seems correct to me however you also said
>I had to add FILE* before o_file = stdout in the main section

What do you mean by this? did you write

static FILE* o_file;
....
int main (int argc, char** argv)
{
FILE* o_file = stdout;
....
}

If this is true you created a new variable (probably never used)
while the global o_file variable has an undefined value. That
would also explain the segmentation fault.

There are probably more variables in the 'main' function
skip all of these and then place the assigment "o_file = stdout;"

Hmmm, you probably don't know what variables are (in C that is)
The first lines after 'main' are variables. The first assigment
probably follows after the first whiteline.

So it should look something like this

int main (int argc, char** argv)
{
char foo;
int bar;
FILE* stuff;

function_call(foo, bar); <- first statement. place the
....                         o_file=stdout; above this.
}

If you can't follow this you can send me the text in the 'main'
function and I will mail the correction to you.
(too lazy too find & download the PnP-tools)


Donnie Roos (who would really enjoy it if people would cut some more text
from their replies)


-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list