parse error at end of input :(

Glen Beane glen.beane@jax.org
Thu Sep 14 17:43:00 GMT 2006


man ld to learn about the linker.

in your case you should have a libcomedi.a (for a static library) or a libcomedi.so (for a shared library).  First, you need to tell the linker to link in one of these files by passing it -lcomedi 
(since you are most likely not invoking the linker directly, you can just pass this argument to gcc ).  Then if you get an error message stating that it cant find libcomedi, you'll need to pass a -L flag to let the linker know in what directory it can find libcomedi.a or libcomedi.so




Jordi Vendrell wrote:
> Thanks for the quick answer.
> Actually I know nearly nothing about how the linker works. Could you
> tell me where to start? (or else how to modify the -L flag?)
> 
> kind regards
> 
> 
> Jordi Vendrell
> 
> 
> 
> 2006/9/14, Glen Beane <glen.beane@jax.org>:
>> thats a linking problem.  It isn't finding the object file that
>> contains the comedi_dara_read function. If that function is in a
>> library, you probably just need to modify the -L flag so the linker
>> can find it.
>>
>>
>>
>> Jordi Vendrell wrote:
>> > Thanks to all, closing a brace fixed the problem.
>> > Now the thing follows with  some messages saying
>> >
>> > /tmp/ccsz9G07.o(.text+0x124): In function `main':
>> > : undefined reference to `comedi_data_read'
>> >
>> > which I guess means a problem with the libraries (comedi.h and
>> > comedilib.h) I think it's a problem with the comedi version, so I'll
>> > compile again and see if it works now
>> >
>> > cheers
>> >
>> > Jordi Vendrell
>> >
>> >
>> >
>> >
>> > 2006/9/14, Jeffrey Holle <jeffreyholle@bellsouth.net>:
>> >> I see that the M_PACK4 macro has an open "(".
>> >>
>> >> John Love-Jensen wrote:
>> >> > Hi Jordi,
>> >> >
>> >> > I see that the body of main has an open-curly brace, but does not
>> >> have a
>> >> > close-curly brace.
>> >> >
>> >> > That will cause a parse error at end of input.
>> >> >
>> >> > HTH,
>> >> > --Eljay
>> >> >
>> >> >
>> >>
>> >>
>>
>> -- 
>> Glen L. Beane
>> Software Engineer II
>> The Jackson Laboratory
>> Phone (207) 288-6153
>>

-- 
Glen L. Beane
Software Engineer II
The Jackson Laboratory
Phone (207) 288-6153



More information about the Gcc-help mailing list