# Compile Demo/PC on Linux natively (GCC x86)

**URL:** <https://forums.freertos.org/t/compile-demo-pc-on-linux-natively-gcc-x86/3648>\
**Category:** Kernel\
**Created:** [March 8, 2010, 8:19pm UTC](https://forums.freertos.org/t/compile-demo-pc-on-linux-natively-gcc-x86/3648 "2010-03-08T20:19:50Z")\
**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:** [March 8, 2010, 8:19pm UTC](https://forums.freertos.org/t/compile-demo-pc-on-linux-natively-gcc-x86/3648/1 "2010-03-08T20:19:50Z")

</div>

**[pfsmorigo](https://sourceforge.net/u/pfsmorigo/)** wrote on [Monday, March 08, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/a4a6b97e/#0f3b):

Hi Everybody,

I’m trying to compile the example from the Demo/PC directory natively on linux, using gcc, but without success.

I currently using the follow command to compile the source. Inside the directory I do:

i586-mingw32msvc-gcc \  
-I. \  
-I$(FREERTOS\_PATH)/Source/include \  
-I$(FREERTOS\_PATH)/Source/portable/oWatcom/16BitDOS/PC \  
-I$(FREERTOS\_PATH)/Source/portable/oWatcom/16BitDOS/common \  
-I…/Common/include \  
main.c \  
./FileIO/fileIO.c \  
./ParTest/ParTest.c \  
$(FREERTOS\_PATH)/Source/croutine.c \  
$(FREERTOS\_PATH)/Source/list.c \  
$(FREERTOS\_PATH)/Source/queue.c \  
$(FREERTOS\_PATH)/Source/tasks.c \  
$(FREERTOS\_PATH)/Source/portable/oWatcom/16BitDOS/PC/port.c \  
$(FREERTOS\_PATH)/Source/portable/oWatcom/16BitDOS/common/portcomn.c \  
$(FREERTOS\_PATH)/Source/portable/MemMang/heap\_2.c  
-o pc

Did I’m missing something, like an include or a source?

Another question: Do I need to install/configure openwatcom in order to work?

The result of the above build is the errors:

…/…/Source/queue.c: In function ‘xQueueGenericSend’:  
…/…/Source/queue.c:480: error: expected ‘(’ before ‘{’ token  
…/…/Source/queue.c:480: error: expected identifier or ‘(’ before numeric constant  
…/…/Source/queue.c:542: error: expected ‘(’ before ‘{’ token  
…/…/Source/queue.c:542: error: expected identifier or ‘(’ before numeric constant  
…/…/Source/queue.c: In function ‘xQueueAltGenericSend’:  
…/…/Source/queue.c:593: error: expected ‘(’ before ‘{’ token  
…/…/Source/queue.c:593: error: expected identifier or ‘(’ before numeric constant  
…/…/Source/queue.c:624: error: expected ‘(’ before ‘{’ token  
…/…/Source/queue.c:624: error: expected identifier or ‘(’ before numeric constant  
…/…/Source/queue.c: In function ‘xQueueAltGenericReceive’:  
…/…/Source/queue.c:682: error: expected ‘(’ before ‘{’ token  
…/…/Source/queue.c:682: error: expected identifier or ‘(’ before numeric constant  
…/…/Source/queue.c:703: error: expected ‘(’ before ‘{’ token  
…. (more errors)….

Thanks in advance!  
Paulo Flabiano Smorigo

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 8, 2010, 8:30pm UTC](https://forums.freertos.org/t/compile-demo-pc-on-linux-natively-gcc-x86/3648/2 "2010-03-08T20:30:22Z")

</div>

**[edwards3](https://sourceforge.net/u/edwards3/)** wrote on [Monday, March 08, 2010](https://sourceforge.net/p/freertos/discussion/382005/thread/a4a6b97e/#a006):

The PC demo is 16bit real mode code and uses DOS style BIOS calls, I don’t think it will work on top of Linux. There is a Linux simulator though.
