I ended up spending almost a month on this issue so I decided to switch to Ubuntu and try compiling the EPOS library there. The compile worked but when I tried to test the connection I couldn't communicate with the controller.
With a little help, I figured out that the "EPOS" model works only with serial RS232 while "EPOS2" model works both with RS232 and USB. Of course, I was trying to connect with RS232 !!BUT!! via a serial to usb converter (my PC didn't support RS232 ). It seems that people at MAXON have set their libraries to work ONLY with serial connection for EPOS model.
So the solution was to plug in at my PC a RS232 port. Doing so the code worked and I finally had access to the controller (using Ubuntu). However, since my project is going to be on embedded systems, I couldn't afford using a serial communication so I used again the converter but this time I erased the file that contained the USB port and linked it to a serial port of my PC !!!
ln /dev/ttyUSB0 /dev/ttyS0
So now I can work with the controller using USB communication.
I also tried to test the communication again at MATLAB on Windows but it didn't work not even with the serial connection. I believe the solution is something similar but I didn't search it further.