If you were looking specifically for I2C, MPU6050, or other I2C devices/hardware I posted a simple C-based I2C solution using WirnigPiI2C and you can find this here:
I have a student working on the mpu6050 code for RasPi right now - getting it work in C and Python first. Then I will be porting it to Simulink most likely next week.
Feel free to send me an email directly and I can try to look at your files when I start start porting my students code: firstname.lastname@example.org
In general for the Rpi you have to make sure the c-code compiles and on its own. If you look at the RPi examples I posted you have to make sure the #includes reference the local directory structure on the RPi - not your box. Just look at the Quadrature Encoder example for the RPi and you will see I had use: #include </home/pi/wiringPi/wiringPi/wiringPiI2C.h>. Which is where the files are on the RPi, not my actual computer. And don't forget to include the actual C files as well: