Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: link error rt_iouser raspberry pi3 pwr6.0

link error rt_iouser raspberry pi3 pwr6.0 1 year 1 week ago #11910

  • ratherhome
  • ratherhome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hello,i have been trying to make my own io-objects for my pi since I cant get the one in proview to work (no support for 32.bit?, never mind I want to do my own anyway :) ). Now to my problem: I have made a ra_io_user.c code-file like the one in the io-guide :
#include "pwr.h"
#include "rt_io_base.h"


pwr_dImport pwr_BindIoUserMethods(PiIO);

pwr_BindIoUserClasses(User) = {
  pwr_BindIoUserClass(PiIO),
  pwr_NullClass
};
I have made objects in the class-volume and creates objekt files from my c-files. When i build my node i get the following error:
** Plc program link errors for arm_linux node plc_pi1_0999_plc
/usr/bin/ld: /usr/pwr60/os_linux/hw_arm/exp/obj/rt_io_user.o:/data0/x6-0-0/pwr/src/exp/rt/src/rt_io_user.c:55:  multiple definition of `pwr_gUser_IoUserClassMethods'; /usr/local/pwrp/pi1/bld/arm_linux/obj/ra_io_user.o:/usr/local/pwrp/pi1/src/appl/ra_io_user.c:9: first defined here
collect2: error: ld returned 1 exit status
row 9 is pwr_BindIoToUserClasses(User). If I change the argument from User to PiIO everything links ok but my io-methods does not seem to work. What am I doing wrong/what have I missed? Regards AE
The administrator has disabled public write access.

link error rt_iouser raspberry pi3 pwr6.0 1 year 1 week ago #11912

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Hi AE,

Set SystemModules/IoUser in the BuildOptions object.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: ratherhome

link error rt_iouser raspberry pi3 pwr6.0 1 year 1 week ago #11913

  • ratherhome
  • ratherhome's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Hi Claes,

thanks a lot!
Actually i had set the IoUser but i did it in the BuildOptions for the sim-node :(

When i fixed that i still got a similar error but then i tried to remove the rt_io_user.o from the ObjectModues list and voila: everything worked! So i guess the rt_io_user.o is included somewhere already...

Thanks again (probably i will run into more trouble with my io-project, but i think i can rely on you sorting things out :) )

Regards
AE
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.575 seconds