diff --git a/examples/simple/README b/examples/simple/README
index 0b63547d75b5db53bbbc081c204558d529912156..13234b3a6590e5fe7a1d2d82867a92391c65b1fe 100644
--- a/examples/simple/README
+++ b/examples/simple/README
@@ -1,5 +1,6 @@
-NB! Before trying to build and run this example, make sure you have built the LabComm compiler
-by running "ant jar" in the main directory (../../ seen from here).
+NB! Before trying to build and run examples, make sure you have built the LabComm compiler
+by running "ant jar" in the main directory (../../ seen from here) and compiled the labcomm
+descriptions needed. The compile.sh script does this.
 
 This is a very simple example with one labcomm file (simple.lc) defining two samples.
 Example source code: Encoders and decoders written in Java and C.
diff --git a/examples/simple/compile.sh b/examples/simple/compile.sh
index 6a25a2ac145828593d3fc576f08297e6d2bbf025..dc8883233eaecae7b7e0f9fec27f17ba543149b6 100644
--- a/examples/simple/compile.sh
+++ b/examples/simple/compile.sh
@@ -1,4 +1,5 @@
 (cd ../../lib/c; make)
+(cd ../../ ; ant jar)
 
 java -jar ../../labComm.jar --java=gen --c=gen/simple.c --h=gen/simple.h  simple.lc 
 
diff --git a/examples/simple/datagram/thr_compile.sh b/examples/simple/datagram/thr_compile.sh
index fc17ae6f61dd80dbaeed22f1031e6e26ef34c5c8..752bfe4159e3331db9e804e81c46fa30a08255fb 100644
--- a/examples/simple/datagram/thr_compile.sh
+++ b/examples/simple/datagram/thr_compile.sh
@@ -1,3 +1,5 @@
-(cd ../../../lib/c; make)
+#(cd ../../../lib/c; make)
+(cd ..; sh compile.sh)
+
 gcc -o thr_example -L ../../../lib/c -I . -I .. -I ../../../lib/c thr_example.c ../gen/simple.c  -llabcomm
 #gcc -o thr_example -L ../../../lib/c -I . -I .. -I ../../../lib/c thr_example.c ../gen/simple.c ../../../lib/c/labcomm_thr_reader_writer.c ../../../lib/c/ThrottleDrv/*.c -llabcomm
diff --git a/examples/simple/datagram/udp_compile.sh b/examples/simple/datagram/udp_compile.sh
index e5a2017ba95660101b8e8e25edc65bb8e7ea09ce..ba5e7718bcbcb56addb770ce141e5df6fd11ef83 100644
--- a/examples/simple/datagram/udp_compile.sh
+++ b/examples/simple/datagram/udp_compile.sh
@@ -1,5 +1,7 @@
-(cd ../../../lib/c; make)
+#(cd ../../../lib/c; make)
 
-gcc -g -o udp_encoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_encoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c -llabcomm
+(cd ..; sh compile.sh)
 
-gcc -g -o udp_decoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_decoder.c ../gen/simple.c ../../../lib/c/labcomm_udp_reader_writer.c udp_hack.c -llabcomm
+gcc -g -o udp_encoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_encoder.c ../gen/simple.c -llabcomm
+
+gcc -g -o udp_decoder -L ../../../lib/c -I . -I .. -I ../../../lib/c udp_decoder.c ../gen/simple.c -llabcomm
diff --git a/lib/c/Makefile b/lib/c/Makefile
index ad619b3f6aa8872002da14d5794a6b38d9a027e0..90b7bc6c9790c1d9a77d8e416164091d1f1c2e34 100644
--- a/lib/c/Makefile
+++ b/lib/c/Makefile
@@ -1,7 +1,7 @@
 CC = gcc
 CFLAGS = -g
 
-liblabcomm.a : labcomm.o labcomm_fd_reader_writer.o labcomm_udp_reader_writer.o labcomm_thr_reader_writer.o ethaddr.o ThrottleDrv/ethernet_drv.o ThrottleDrv/throttle_drv.o
+liblabcomm.a : labcomm.o labcomm_fd_reader_writer.o labcomm_udp_reader_writer.o udp_hack.o labcomm_thr_reader_writer.o ethaddr.o ThrottleDrv/ethernet_drv.o ThrottleDrv/throttle_drv.o
 #	ar -r liblabcomm.a labcomm.o labcomm_fd_reader_writer.o ethaddr.o
 	ar -r liblabcomm.a $^