c_function / function in file in support file area / how to invoke from within the testcases area

c_function / function in file in support file area / how to invoke from within the testcases area

de către Christian Gasde-
Număr de răspunsuri: 2

Hi Richard,

just before Easter here comes another little question... :-)


coderunner -> question typ -> c_function

We added a simple c file (unsichtbar_extern.c) to the support files area.

In the testcase area now we want to invoke a function which is defined in that added file.

Usecase / file / supported file area / test area / error calling a function

But it doesn't work. Are some additional settings missing?

Our usecase is to outsource some test-logic into a seperated file because the testcase area gets to crowded if you want to have some more complex test-logic.

Any help is appreciated.

Thanks & Best Regards!
Chris


Ca răspuns la Christian Gasde

Re: c_function / function in file in support file area / how to invoke from within the testcases area

de către Christian Gasde-
Using :
#include "unsichtbar_extern.c"
instead of
#include "unsichtbar_extern.h"
then it works... 

Best Regards
Chris
Ca răspuns la Christian Gasde

Re: c_function / function in file in support file area / how to invoke from within the testcases area

de către Richard Lobb-
hash-including your support source files works, but that's a very non-standard approach.

If you want your support file(s) to be compiled and linked with the student answer in the usual manner, you'll have to set the sandbox compileargs to compile it/them and the linkargs to link it/them.