trying to write my first component but have failed to compile so far
Reduced file to smallest possible.but no matter what i write ,I keep getting the same error message ( even when using component from others )

Quote => " But next time i will try to make a mini tutorial how to compile a component."
Grotius I'm sure this will be welcomed by a lot of CNC enthousiast and the like.

I don't understand the programming requirements for a component very well.
I found a very nice online C editor and compiler.
www.onlinegdb.com/online_c_compiler
but when typing in a component program it does not react very well at all
However, I did learn from it that turn-turret does not compile , but turn_turret does.
1)Is it possible to troubleshoot ( debug ) one's program in a non linuxcnc terminal environment?
2)What is the difference between a component for linuxcnc and a C program ?

I have to conclude that the problem is not with the component.
But what else could it be ?
Had a look at Jeff Eplers Halcompiler program where line 1353 =>
main ()
whitch is the last line of the program.
do i have corrupt or missing file or files ??
It leaves me completely clueless.

C is case sensitive " If" is not the same as" if"
you will need to declare what your variables/ hal pins are
names should be in sequential parenthesis
you have to name the component
Spend some time in the hal manual and look up the toolchange comp for the first guy that retrofitted an HNC, it is very simple and makes sense. His first name was Kurt.
Most important, you have to know what you really want your component to do, you might try "hello world" with the gcc. Halcompile is for hal components.

so , more like this

component tool change;

pin in bit tool_change;
pin out bit turn_turret ;

function( _);
;;
;;
{
if((tool_change)==1){
turn_turret =1;
}
}

Im a big fan of components for plc functions, but it is a large learning curve.Ladder might be easier.