Coder Social home page Coder Social logo

Comments (7)

gfyrtuwcv avatar gfyrtuwcv commented on June 16, 2024

I want use GL3 build osg, added a line of set(osg_OPENGL_PROFILE "GL3") to the x64-windows.cmake file. And then there's this problem

from vcpkg.

LilyWangLL avatar LilyWangLL commented on June 16, 2024

Duplicate of #33008

from vcpkg.

gfyrtuwcv avatar gfyrtuwcv commented on June 16, 2024

I reinstalled VS2022 and installed the latest MSVC 14.39.33519, but I still got an error,It seems that min\max and std:: min () and std:: max () are conflicts defined by Visual C ++. I don't know how to solve them

from vcpkg.

dg0yt avatar dg0yt commented on June 16, 2024

Some configuration seem to include windows.h before or without defining NOMINMAX.

from vcpkg.

gfyrtuwcv avatar gfyrtuwcv commented on June 16, 2024

I added -DNOMINMAX=ON at vcpkg_cmake_configure(OPTIONS) in vcpkg\ports\osg\portfile.cmake , like this
vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DNOMINMAX=ON
And add add_definitions(-DNOMINMAX) to vcpkg\buildtrees\osg\src\raph-3.6.5-c3f8c61ada.clean\CMakeLists.txt .
Not sure which one worked, but osg is installed!

from vcpkg.

dg0yt avatar dg0yt commented on June 16, 2024

I added -DNOMINMAX=ON at vcpkg_cmake_configure(OPTIONS) in vcpkg\ports\osg\portfile.cmake , like this vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} -DNOMINMAX=ON And add add_definitions(-DNOMINMAX) to vcpkg\buildtrees\osg\src\raph-3.6.5-c3f8c61ada.clean\CMakeLists.txt . Not sure which one worked, but osg is installed!

I don't believe this is the fix. It must be passed to the compiler (preprocessor macro), not to cmake (option).
add_definitions is the key.

from vcpkg.

gfyrtuwcv avatar gfyrtuwcv commented on June 16, 2024

In fact, I changed the portfile.cmake configuration to run vcpkg install osg,then add 'add_definitions(-DNOMINMAX)' to vcpkg\buildtrees\osg\src\raph-3.6.5-c3f8c61ada.clean\CMakeLists.txt .
Probably made it work by changing the CMakeLists before it started building, which I know is not a good idea, but haven't figured out a better way

from vcpkg.

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.