Announcement

REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at https://forum.rexygen.com.

Looking forward to meeting you there!
 

#1 2016-12-19 22:35:29

bodie
Member
Registered: 2016-12-19
Posts: 10

REXLANG include file

Hello,
can I ask for the way, how to include in RexLang srcfile.c next file with some functions, if it is possible?
I try the same as in C-programs:

srcfile.c

#define VAL1 10

#include "secti.h"

double output(0) firstoutput; 
double output(1) secondoutput;

int count = 0;

long init(void)
{	
	return 0;
}

long main(void)
{
	
	firstoutput = soucet(count, VAL1);
	secondoutput = VAL1;
	
	return 0;
}

long exit(void)
{
	return 0;
}

secti.h

#ifndef SECTI_H_
#define SECTI_H_

int soucet(int a, int b);

#endif /* SECTI_H_ */

secti.c

#include "secti.h"

int soucet(int a, int b){
	return (a + b);
}

But the compilation ends with this messahe:

Error compiling file 'secti.h' (line 4): syntax error
srcfile.c [3] warning: comment or #ifdef not end in current file
[0] warning: comment or #ifdef not end in current file
Error 125: The configuration validation error occured in:
Error 126:     Validation error -220 (REXLANG compilation error) in the pin 'rex3_proces.REXLANG:srcname'


Thanks for help.

Offline

#2 2016-12-20 10:12:20

tomáš čechura
Administrator
Registered: 2016-02-22
Posts: 371

Re: REXLANG include file

Hi bodie,

thank you for your question. In general, it is possible to include other C files in Rexlang.
However, including header files (".h") is not supported. It means that you have to include only source files (".c") with declaration inside.

Hope it helps. If you require any further information, let me know.

Regards, Tomas

Offline

#3 2016-12-21 10:14:32

bodie
Member
Registered: 2016-12-19
Posts: 10

Re: REXLANG include file

Hi,
thanks for your advice, I will try it.

Offline

Board footer

Powered by FluxBB