# MPLAB C30 fails on xSemaphoreCreateMutex

**URL:** <https://forums.freertos.org/t/mplab-c30-fails-on-xsemaphorecreatemutex/2525>\
**Category:** Kernel\
**Created:** [May 9, 2008, 8:03am UTC](https://forums.freertos.org/t/mplab-c30-fails-on-xsemaphorecreatemutex/2525 "2008-05-09T08:03:42Z")\
**Posts on this page:** 2\
**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:** [May 9, 2008, 8:03am UTC](https://forums.freertos.org/t/mplab-c30-fails-on-xsemaphorecreatemutex/2525/1 "2008-05-09T08:03:42Z")

</div>

**[williamfrasson](https://sourceforge.net/u/williamfrasson/)** wrote on [Friday, May 09, 2008](https://sourceforge.net/p/freertos/discussion/382005/thread/7019d0af/#8e20):

Hi,  
I’m tring to use a Mutex Semaphore into my code.  
When i compile the code " xSemaphore =&nbsp; xSemaphoreCreateMutex(); "  
the linker returns errors:  
“undefined reference to `xQueueCreateMutex’”

I also see that #define configUSE\_MUTEXES should be defined = 1 but this is not done nowhere in the code and the file freeRTOSConfig.h doesn’t have this define.

What wrong?  
Thank for the help…

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 9, 2008, 8:47am UTC](https://forums.freertos.org/t/mplab-c30-fails-on-xsemaphorecreatemutex/2525/2 "2008-05-09T08:47:16Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, May 09, 2008](https://sourceforge.net/p/freertos/discussion/382005/thread/7019d0af/#8e20/488b):

Just add it the the FreeRTOSConfig.h file then you should be ok.&nbsp; Missing constants are just defaulted to 0.

Regards.
