Indeed, the issue is due to architecture compatibilities. The Galileo board is certainly Arduino compatible; however there are Arduino libraries that have been written based on AVR architectures (Arduino boards). This means, those libraries won't work on Galileo because it has a different architecture.
The alternative would be to re-write the Arduino library in order to be Galileo compatible, however this "conversion" might prove challenging, depending on the library. Other option would be to write a new library based on the device you want to use and its datasheet.
One third option is to use another library or approach for your project. The following thread is about an OLED display. I recommend you to check it, you might find it interesting: