unclosed token expat

J

Jens Thoms Toerring

gert said:
Hi, can anybody tell me what i did wrong please ?
I get unclosed token in line 1 running ./make.sh


http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/cgi.c?revision=164&view=markup

I can't remember to have seen an error message mentioning an
"unenclosed token" from a C compiler, so I assume that it
comes from the make.sh shell script (and in the future please
post complete error messages exactly as you got them, not
something you rephrased). Moreover the C files look more or
less ok (except the use of XMLCALL, that may be needed for the
library to get it to compile under some circumstnces, but not
for your program, and that you shouldn't cast the return value
of malloc() and you must check it), at least there's nothing
on the first lines of them that should trigger such an error
message. But if it's from the shell script you should be asking
somewhere else, e.g. in comp.unix.programmer or comp.unix.shell,
where shell programing is more on-topic. (And, no, I had a look
at the shell script and there's also nothing that would make me
expect an error message about an "unclosed token". The thing I
would definitely change is to move the '-lexpat' to the end of
the gcc line.)

But I am rather sure that your problem is neither related to
the make script nor the compiling of the program, but that it
is an error you get when running the resulting program. If
that's the case it's also rather off-topic here since it's
related to the use of the expat library and not something
concerning C. There are several mailing list for the expat
library, see

http://mail.libexpat.org/mailman/listinfo

and some issues with an error message about an "unclosed token
at line 1" already seem to have been discussed there some time
ago. Just do a Google search for "unclosed token at line 1".
If that doesn't help you, you probably best ask there.

Regards, Jens
 
G

gert

I can't remember to have seen an error message mentioning an
"unenclosed token" from a C compiler, so I assume that it
comes from the make.sh shell script (and in the future please
post complete error messages exactly as you got them, not
something you rephrased). Moreover the C files look more or
less ok (except the use of XMLCALL, that may be needed for the
library to get it to compile under some circumstnces, but not
for your program, and that you shouldn't cast the return value
of malloc() and you must check it), at least there's nothing
on the first lines of them that should trigger such an error
message. But if it's from the shell script you should be asking
somewhere else, e.g. in comp.unix.programmer or comp.unix.shell,
where shell programing is more on-topic. (And, no, I had a look
at the shell script and there's also nothing that would make me
expect an error message about an "unclosed token". The thing I
would definitely change is to move the '-lexpat' to the end of
the gcc line.)

But I am rather sure that your problem is neither related to
the make script nor the compiling of the program, but that it
is an error you get when running the resulting program. If
that's the case it's also rather off-topic here since it's
related to the use of the expat library and not something
concerning C. There are several mailing list for the expat
library, see

http://mail.libexpat.org/mailman/listinfo

and some issues with an error message about an "unclosed token
at line 1" already seem to have been discussed there some time
ago. Just do a Google search for "unclosed token at line 1".
If that doesn't help you, you probably best ask there.

Regards, Jens

I did the changes you told me to the code, malloc check/no cast,
remove XMLCALL (you have no idea how much i liked to get rid of that),
-lexpat and googled the line error that told me it had to do with a 0
terminator or something (adding \0 did not work do) Anyway know that i
know it has to do with the shell script i can further investigate

http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/make.sh?revision=166&view=markup
http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/xml.c?revision=166&view=markup
http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/cgi.c?revision=166&view=markup
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top