On Friday, 8 April 2022 14:26:21 EDT Danny Miller wrote:
> I used "sudo apt-get install" and libmodbus5 was already there.
> 
> halcompile --install x200_vfd.comp does:
> 
> gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULPAI
> -Os -o x200_vfd /tmp/tmp4bdQIY/x200_vfd.c -Wl,-rpath,/lib -L/lib
> -llinxcnchal
> 
> Then, no error about missing typedef (and function prototypes)- which
> would have been a lack of a header file.  It's got the header file, now
> "undefined reference" for the functions.  So the header prototyped the
> function now, but it's not seeing the actual compiled code
> "modbus_write_registers" etc
> 
> Danny
> 

So I'm lost. Sorry for the noise.
> On 4/8/2022 12:25 PM, gene heskett wrote:
> > On Friday, 8 April 2022 13:06:57 EDT Danny Miller wrote:
> >> So, I think libmodbus-dev is correct,  the typedef and function
> >> names
> >> match.
> >> 
> >> I installed it, now the file in  /usr/include/modbus/modbus.h should
> >> work, and it looks like halcompile definitely uses it when given an
> >> explicit path, since the error message changes.
> >> 
> >> That directory just has the header file, it looks like the error is
> >> that it can't actually find the compiled definitions of the
> >> functions
> >> called out in the header.
> >> 
> >> Danny
> > 
> > That sounds like you do not have libmodbus5 installed. And that
> > puzzles me a bit because libmodbus-dev should have pulled it in as a
> > dependency.
> > 
> > What utility are you useing to install this stuff?
> > 
> >> On 4/7/2022 9:01 PM, Danny Miller wrote:
> >>> Thanks Andy!  Closer...  it's in /usr/include/modbus/
> >>> 
> >>> I specified that.  Now it doesn't fail on a missing type modbus_t,
> >>> but
> >>> rather "undefined reference" to any modbus_write_bit etc functions.
> >>> So even though I did get that install for libmodbus to work, it
> >>> just
> >>> has the header file.  It's not able to find the definitions in a
> >>> compiled file.
> >>> 
> >>> More ideas?
> >>> 
> >>> Danny
> >>> 
> >>> On 4/7/2022 5:23 AM, andy pugh wrote:
> >>>> On Thu, 7 Apr 2022 at 03:27, Danny Miller <dan...@austin.rr.com>
> > 
> > wrote:
> >>>>> And same prob.  It's looking for stuff in the libmodbus's
> >>>>> modbus.h
> >>>>> but
> >>>>> it's not seeing it somehow.
> >>>> 
> >>>> You could try giving it a complete path:
> >>>> 
> >>>> #include "/usr/share/modbus/modbus.h"
> >>>> 
> >>>> (quotes rather than braces, I think, for an explicit path)
> >>>> 
> >>>> Or, maybe
> >>>> 
> >>>> #include <modbus/modbus.h>
> >>>> 
> >>>> As libmodbus installs into a directory.
> >>> 
> >>> _______________________________________________
> >>> Emc-users mailing list
> >>> Emc-users@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/emc-users
> >> 
> >> _______________________________________________
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> > 
> > Cheers, Gene Heskett.
> 
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis





_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to