# compiling error

**URL:** <https://forums.freertos.org/t/compiling-error/4199>\
**Category:** Kernel\
**Created:** [September 18, 2006, 7:30pm UTC](https://forums.freertos.org/t/compiling-error/4199 "2006-09-18T19:30:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 7:30pm UTC](https://forums.freertos.org/t/compiling-error/4199/1 "2006-09-18T19:30:45Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425):

Hi All,  
I just started with FreeRTOS.  
please may someone tell me why i receive "error(128):Function argument incomplatible with its declaretion " when compiling this:

int main(void)  
{  
&nbsp;&nbsp; /\* Create the sample tasks. \*/  
&nbsp;&nbsp; xTaskCreate( Task1, "Task1",&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configMINIMAL\_STACK\_SIZE, (void \*)10,&nbsp; tskIDLE\_PRIORITY + 1, NULL);

&nbsp;&nbsp;&nbsp; vTaskStartScheduler();

&nbsp;&nbsp;&nbsp; return 0;  
}

void Task1( void \*pvParameters )  
{  
&nbsp; int x = (int)pvParameters;

&nbsp;&nbsp;&nbsp;&nbsp; for( ;; )  
&nbsp;&nbsp;&nbsp;&nbsp; {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Task code goes here.  
&nbsp;&nbsp;&nbsp;&nbsp; }

}

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 8:18pm UTC](https://forums.freertos.org/t/compiling-error/4199/2 "2006-09-18T20:18:51Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425/6c69):

Assuming the error is for the xTaskCreate() call - have you a prototype for the function Task1 before main()?

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 9:20pm UTC](https://forums.freertos.org/t/compiling-error/4199/3 "2006-09-18T21:20:04Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425/6c69/af22):

Thank you for you response,  
Yes, the prototype is on "task.h", included just above main.  
The error refers to the pcName argument.

signed portBASE\_TYPE xTaskCreate(  
&nbsp;&nbsp;&nbsp;&nbsp; pdTASK\_CODE pvTaskCode,  
&nbsp;&nbsp;&nbsp;&nbsp; const signed portCHAR \* const pcName,  
&nbsp;&nbsp;&nbsp;&nbsp; //const portCHAR \* const pcName,  
&nbsp;&nbsp;&nbsp;&nbsp; unsigned portSHORT usStackDepth,  
&nbsp;&nbsp;&nbsp;&nbsp; void \*pvParameters,  
&nbsp;&nbsp;&nbsp;&nbsp; unsigned portBASE\_TYPE uxPriority,  
&nbsp;&nbsp;&nbsp;&nbsp; xTaskHandle \*pvCreatedTask  
&nbsp;&nbsp;&nbsp;&nbsp; );

Israel

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 9:35pm UTC](https://forums.freertos.org/t/compiling-error/4199/4 "2006-09-18T21:35:09Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425/6c69/af22/6e05):

Not sure if we are talking at cross purposes here.&nbsp; I was referring to a prototype for Task1 function, not the inclusion of task.h.&nbsp; It seems this is not the problem anyway if the error is on the pcName parameter.

You could try casting it to const \* const.

Which compiler for which chip are you using?&nbsp; Some compilers default char \* to signed char \*, and some to unsigned char \* which is why FreeRTOS has to cast everything explicitly to remove the warnings.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 9:51pm UTC](https://forums.freertos.org/t/compiling-error/4199/5 "2006-09-18T21:51:04Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425/0ce7):

I’m trying to port to an old z80 board&nbsp; wit a IAR compiler, and this is the definition of types on portmacro.h

/\* Type definitions. \*/  
#define portCHAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char  
#define portFLOAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float  
#define portDOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double  
#define portLONG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long  
#define portSHORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; short  
#define portSTACK\_TYPE&nbsp;&nbsp;&nbsp; unsigned int  
#define portBASE\_TYPE&nbsp;&nbsp;&nbsp; int

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 18, 2006, 10:04pm UTC](https://forums.freertos.org/t/compiling-error/4199/6 "2006-09-18T22:04:10Z")

</div>

**nobody** wrote on [Monday, September 18, 2006](https://sourceforge.net/p/freertos/discussion/382005/thread/b9339d5d/#c425/f05c):

I’ll study the compiler manual and see if i can find something related to this.

Thank you

Israel
