What is minimal required c++ version? #2561
Replies: 1 comment
-
|
c++17.
Laurent Perron | Operations Research | ***@***.*** | (33) 1 42 68 53
00
Le jeu. 20 mai 2021 à 14:01, pewsou ***@***.***> a écrit :
… I want to build version 8.2 under MacOS 10.12.6 with Xcode 8.3.3
It appears that the whole project can be built with c++14 with warnings
like that:
clang++ -fPIC -std=c++14 -mmacosx-version-min=10.9 -stdlib=libc++ -O4
-DNDEBUG -I. -Iortools/gen -Wno-deprecated -DUSE_GLOP -DUSE_BOP
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-DUSE_CLP
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-DUSE_CBC
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-DUSE_SCIP -DNO_CONFIG_HEADER -DOR_TOOLS_MAJOR=8 -DOR_TOOLS_MINOR=2 -c
./ortools/constraint_solver/routing.cc -o objs/constraint_solver/routing.o
./ortools/constraint_solver/routing.cc:2043:22: warning: decomposition
declarations are a C++1z extension [-Wc++1z-extensions]
for (const auto& [demand, positive_nodes] : nodes_by_positive_demand) {
^~~~~~~~~~~~~~~~~~~~~~~~
./ortools/constraint_solver/routing.cc:2056:13: warning: decomposition
declarations are a C++1z extension [-Wc++1z-extensions]
for (auto [pickup, delivery] : implicit_pickup_deliveries) {
^~~~~~~~~~~~~~~~~~
./ortools/constraint_solver/routing.cc:4435:21: warning: decomposition
declarations are a C++1z extension [-Wc++1z-extensions]
for (const auto [type, op] : operator_by_type) {
^~~~~~~~~~
./ortools/constraint_solver/routing.cc:4449:21: warning: decomposition
declarations are a C++1z extension [-Wc++1z-extensions]
for (const auto [type, op] : operator_by_type) {
^~~~~~~~~~
4 warnings generated.
when I switch to c++11 then *most* of the package can be compiled with
c++11, and then I get error like this:
$ make cc
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
clang++ -fPIC -std=c++11 -mmacosx-version-min=10.9 -stdlib=libc++ -O4
-DNDEBUG -I. -Iortools/gen -Wno-deprecated -DUSE_GLOP -DUSE_BOP
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-DUSE_CLP
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include/coin
-DUSE_CBC
-I/Users/username/sync/progtools/or-tools-stable/dependencies/install/include
-DUSE_SCIP -DNO_CONFIG_HEADER -DOR_TOOLS_MAJOR=8 -DOR_TOOLS_MINOR=2 -c
./ortools/linear_solver/scip_interface.cc -o
objs/linear_solver/scip_interface.o
./ortools/linear_solver/scip_interface.cc:1114:7: error: no matching
constructor for initialization of
'ScipConstraintHandler<operations_research::(anonymous
namespace)::EmptyStruct>'
: ScipConstraintHandler(
^
./ortools/linear_solver/scip_callback.h:118:7: note: candidate constructor
(the implicit copy constructor) not viable: cannot convert
initializer list argument to 'const
operations_research::ScipConstraintHandler<operations_research::(anonymous
namespace)::EmptyStruct>'
class ScipConstraintHandler {
^
./ortools/linear_solver/scip_callback.h:120:12: note: candidate
constructor not viable: cannot convert initializer list argument to
'const operations_research::ScipConstraintHandlerDescription'
explicit ScipConstraintHandler(
^
1 error generated.
make: *** [objs/linear_solver/scip_interface.o] Error 1
As far as I can see the this file is binding to some optimization engine.
If so, why the binding needs to use higher version of c++ than c++11?
Is it possible to guarantee homogenous, c++11 or c++14 at max build
support for the whole package?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2561>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3OHXPEBXZB7NBJB3RLTOT22VANCNFSM45G3C63A>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lperron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to build version 8.2 under MacOS 10.12.6 with Xcode 8.3.3
It appears that the whole project can be built with c++14 with warnings like that:
when I switch to c++11 then most of the package can be compiled with c++11, and then I get error like this:
As far as I can see the this file is binding to some optimization engine. If so, why the binding needs to use higher version of c++ than c++11?
Is it possible to guarantee homogenous, c++11 or c++14 at max build support for the whole package?
Beta Was this translation helpful? Give feedback.
All reactions