[FONT=Courier New][SIZE=2][COLOR=#0000ff]#include [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#ff00ff]<bur/plc.h> [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#0000ff]#include [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#ff00ff]"bur/plctypes.h"[/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#0000ff]#include [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#ff00ff]"brsystem.h"[/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#0000ff]#include [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#ff00ff]"sys_lib.h"[/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2]_LOCAL RTInfo_typ rt_info; [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000]/* instance variable of RTInfo */[/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]/*************************************************************[/COLOR][/SIZE][/FONT]
[SIZE=2][FONT=Courier New][COLOR=#008000]* init up[/COLOR][/FONT][/SIZE]
[SIZE=2][FONT=Courier New][COLOR=#008000]**************************************************************/[/COLOR][/FONT][/SIZE]
[FONT=Courier New][SIZE=2][COLOR=black][COLOR=#0000ff][COLOR=#000000][COLOR=#0000ff]void [/COLOR]_INIT [/COLOR][/COLOR][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]dev_com[/COLOR]([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[SIZE=2][FONT=Courier New]{[/FONT][/SIZE]
[COLOR=black]rt_info.enable = 1; [/COLOR][COLOR=#008000]/* enables the function */[/COLOR]
[COLOR=red]RTInfo(&rt_info); [/COLOR][COLOR=#008000]/* gets information from the software object */[/COLOR]
[/COLOR][/SIZE][/FONT][COLOR=black][FONT=Courier New][SIZE=2]uchCycTim = [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=black]rt_info.cycle_time/1000; [/COLOR][COLOR=#008000]/* cycle time in ms */[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=black][FONT=Courier New][COLOR=#008000]}[/COLOR][/FONT]
[/COLOR]
[FONT=Courier New][SIZE=2][COLOR=#ff0000]\pgm\project\cpu\dev_com.c:(122) :Error: undefined reference to `_RTInfo'[/COLOR][/SIZE][/FONT]
[COLOR=#0000ff]#include [/COLOR][COLOR=#ff00ff]<bur/plc.h>[/COLOR]
[COLOR=#0000ff]#include [/COLOR][COLOR=#ff00ff]<brsystem.h>[/COLOR]
_GLOBAL RTInfo_typ rt_info;
[COLOR=#0000ff][COLOR=#000000][COLOR=#0000ff]void [/COLOR]_INIT [/COLOR][/COLOR][COLOR=#000000]init([/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#000000]{ [/COLOR]
[COLOR=#000000]rt_info.enable = [/COLOR][COLOR=#800000]1[/COLOR][COLOR=#000000]; [/COLOR][COLOR=#008000]/* enables the function */[/COLOR]
[COLOR=#000000]RTInfo(&rt_info); [/COLOR][COLOR=#008000]/* gets information from the software object */[/COLOR]
[COLOR=#000000]}[/COLOR]
Ja, die Libraries habe ich mit dem Manager eingebunden und die .h- und .c-Files befinden sich im gleichen Strang.Hast du die Library-Files mit hilfe des Library-Managers in dein Projekt eingebunden?
Sind die .h Files auch in dem gleichen Strang wie die .c Files?
War etwas unsauber beim reinkopieren ;-)Ausserdem fehlt bei deinem Code die zweite "}" Klammer am Schluss und das "void" kommt vor das _INIT. Mach doch auch mal den "/" vor der Zeile rt_info... weg.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?