[Solved] ModBus server comp error: expecte

More
04 May 2016 10:33 - 05 May 2016 17:56 #74213 by bkt
In order to try and test my new component for make a usercomp with modbus server i get these error at first compiling ....
halcompile --compile --userspace  k1MbServer.comp
gcc -Os -g -I. -I/usr/realtime-2.6.32-122-rtai/include -I. -I/usr/realtime-2.6.32-122-rtai/include -D_FORTIFY_SOURCE=0 -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI -Os  -o k1MbServer /tmp/tmp_VFDTq/k1MbServer.c -Wl,-rpath,/lib -L/lib -llinuxcnchal 
In file included from /usr/local/include/modbus/modbus.h:283,
                 from k1MbServer.comp:125:
/usr/local/include/modbus/modbus-rtu.h:35: error: expected ‘)’ before ‘->’ token
k1MbServer.comp: In function ‘user_mainloop’:
k1MbServer.comp:264: warning: ‘return’ with a value, in function returning void
make: *** [k1MbServer] Error 1

I add my file (my idea is share it ..)

I've not solution for these error ..... the component is not tested yet ..... and not well structured...

regards
giorgio

File Attachment:

File Name: k1MbServer.comp
File Size:14 KB
Attachments:
Last edit: 05 May 2016 17:56 by bkt.

Please Log in or Create an account to join the conversation.

More
05 May 2016 17:55 - 05 May 2016 17:57 #74281 by bkt
...................................................................
...................................................................
...................................................................


in the doc: option_link_args " ..." for add link etc etc .....

instead these command I wrote:
option_compile_args "-lm etc etc ...." ... in the old discussion with arcEye & andyPugh i see a link to parser.c file of halcompile ..... inside the file I found these option ....

Now all work fine!! (I add my definitive comp after hard test!..)

Regards
Giorgio
Last edit: 05 May 2016 17:57 by bkt.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds
Powered by Kunena Forum