VOGONS


First post, by jakle

User metadata
Rank Newbie
Rank
Newbie

Greetings,
I am trying to compile DOSBox under Visual Studio, I have all of the libarires that I want and linked. But this is a roadblock for me.
When I compile, 6 warnings appear, "Warning C4738: storing 32-bit float result in memory, possible loss of performance" all in pngget.c from libpng.
Afterwards a error, "error LNK1257: code generation failed". Then another error "error C2220: warning treated as error - no 'executable' file generated"

How can I resolve this to compile DOSBox? I tried compiling without libpng & C_SSHOT but I got "error LNK1123: failure during conversion to COFF: file invalid or corrupt"

Reply 4 of 4, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie
jakle wrote on 2022-08-02, 00:33:

Warning C4738: storing 32-bit float result in memory, possible loss of performance
error C2220: warning treated as error - no 'executable' file generated

Seems like this spurious warning is treated as an error.
One way of solving this would be to disable warning C4738 somewhere in project properties, alternatively you can disable treating warnings as errors.

https://docs.microsoft.com/en-us/cpp/error-me … 0?view=msvc-170