Larswad / uno2iec

A commodore (CBM) 1541 emulator on the Arduino Uno, using any desktop PC (or raspberry PI with raspbian) as a media host.
http://larswad.github.io/uno2iec/
134 stars 36 forks source link

Compiler problems/errors with VS2013 #5

Closed teki closed 9 years ago

teki commented 9 years ago

First is a warning: "-std=gnu++0x" is not valid on Windows, qmake gives a warning, then during the build: 1>cl : Command line warning D9002: ignoring unknown option '-std=gnu++0x'

Then the build errors: not, not_eq and friends are macros. A few #include is missing. (The best would be to remove the use of them all together, it makes to read the code hard.) It builds with the following patch: http://pastebin.com/GhMZASZC

Larswad commented 9 years ago

teki, thanks for sharing your findings and reporting it here. Actually, I thought that I had made that c++0x switch dependant on platform so that the VS compilers would have the right switch. But obviously not (I have to recheck this). I do use initializer lists on a couple of places that is c++0x additions, didn't that break under windows build if there is no explicit VS compiler switch for that?

And also, I thought that I had fixed the include for the (standard) alternate operators under Windows. Good findings, I will look at your patch and update.

Many thanks.

teki commented 9 years ago

I do use initializer lists on a couple of places that is c++0x additions, didn't that break under windows build if there is no explicit VS compiler switch for that?

It is not a problem for VS2013, it can be for earlier ones.

Larswad commented 9 years ago

It should now conditonally compile correctly for both windows and Linux with the c++11 switch. Please try it out.

Larswad commented 9 years ago

Builds properly now. Closing.