Coder Social home page Coder Social logo

Windows Build Error about oppai HOT 6 CLOSED

francesco149 avatar francesco149 commented on August 27, 2024
Windows Build Error

from oppai.

Comments (6)

omkelderman avatar omkelderman commented on August 27, 2024

I get

C:\Users\Olle\git\oppai\win>build.bat
A subdirectory or file ..\build already exists.
Could Not Find C:\Users\Olle\git\oppai\build\oppai.exe
Could Not Find C:\Users\Olle\git\oppai\build\oppai.obj
main.cc
c:\users\olle\git\oppai\diff_calc.cc(56): error C2220: warning treated as error
- no 'object' file generated
c:\users\olle\git\oppai\diff_calc.cc(56): warning C4458: declaration of 'ctx' hi
des class member
c:\users\olle\git\oppai\diff_calc.cc(56): note: to simplify migration, consider
the temporary use of /Wv:18 flag with the version of the compiler with which you
 used to build without warnings
c:\users\olle\git\oppai\diff_calc.cc(37): note: see declaration of 'd_obj::ctx'

to have an english version 😛 (altho I dont have the long error messages for some reason.. 🤷‍♂️)

from oppai.

Francesco149 avatar Francesco149 commented on August 27, 2024

interesting how newer versions of msvc warn about this while older ones don't.

can you edit build.bat and add -wd4458 to the compiler flags and see if it works?

using -Wv:18 is not an option unless there's no other way because it doesn't work on older msvc versions that didn't have it

from oppai.

Antosik avatar Antosik commented on August 27, 2024

after added -wd4458 VS2015 builds fine, VS2017 doesn't work (same error)

from oppai.

Francesco149 avatar Francesco149 commented on August 27, 2024

pushed an update that fixes the std::algorithm type warning... freakin templates.

see if it works now

from oppai.

Francesco149 avatar Francesco149 commented on August 27, 2024

btw, the reason for that template warning is that stdlib's tolower/toupper return int and std::transform wants a function that returns char

and apparently, those return int because:

tolower is an ancient function inherited from 1970's-era C, before function signatures reliably existed
and before people really cared about different integer types for expressions.

I was aware of the implicit int return type, but I didn't know these funcs were that old

current solution is wrapping them in a fucntion that returns char, I'm not sure why I didn't use std::toupper, but uh, for now I'll use the wrapper functions as there might be a reason I didn't use the std variant that I can't remember

from oppai.

Francesco149 avatar Francesco149 commented on August 27, 2024

closing this since there has been no answer, reponen if you still have issues with vs2017+

from oppai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.