I have tried to recompile the latest version of the GoggleAPI and I get the following errors.
I am using VS2010 Sp1. I have downloaded v1.8.1.
I need to be able to recompile so I can make changes to solve an issue I am having. I can step into the code but I cannot make any changes currently because I can't recompile.
Any ideas ... This is a followup to my previous post but the other post I think confused what I need help with.
I just need to be able to recompile. Can I not use VS2010 to recompile?
Build Log ------ Build started: Project: GoogleApis.Core, Configuration: Debug Any CPU ------
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(161,60): error CS1003: Syntax error, '(' expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(161,69): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(162,31): error CS1044: Cannot use more than one type in a for, using, fixed, or declaration statement
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(162,48): error CS1002: ; expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(175,32): error CS1519: Invalid token '(' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(175,56): error CS1519: Invalid token ')' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(178,13): error CS1519: Invalid token 'do' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(180,63): error CS1519: Invalid token '(' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(182,30): error CS1519: Invalid token '!=' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(184,37): error CS1519: Invalid token '(' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(185,30): error CS1519: Invalid token '=' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(187,17): error CS0116: A namespace cannot directly contain members such as fields or methods C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(219,84): error CS1518: Expected class, delegate, enum, interface, or struct C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(229,21): error CS0116: A namespace cannot directly contain members such as fields or methods
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\ConfigurableMessageHandler.cs(240,17): error CS1022: Type or namespace definition, or end-of-file expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(122,41): error CS1003: Syntax error, '(' expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(122,60): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(122,96): error CS1002: ; expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(125,48): error CS1519: Invalid token '!=' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(125,59): error CS1520: Method must have a return type
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(125,103): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(125,104): error CS1002: ; expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(127,60): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(127,83): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(127,107): error CS1001: Identifier expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(127,108): error CS1002: ; expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(128,21): error CS1519: Invalid token '.' in class, struct, or interface member declaration
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(128,22): error CS1520: Method must have a return type
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(128,37): error CS1031: Type expected
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(130,13): error CS0116: A namespace cannot directly contain members such as fields or methods
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(137,24): error CS1518: Expected class, delegate, enum, interface, or struct
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(156,17): error CS1518: Expected class, delegate, enum, interface, or struct
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(179,27): error CS1518: Expected class, delegate, enum, interface, or struct
C:\Work\BM Projects\GoogleAPI\v3 Source\Src\GoogleApis.Core\Apis\Http\BackOffHandler.cs(183,5): error CS1022: Type or namespace definition, or end-of-file expected
...
Compile complete -- 3 errors, 0 warnings All packages listed in packages.config are already installed. ========== Build: 0 succeeded or up-to-date, 8 failed, 0 skipped ==========
Packages
03/25/2014 05:40 PM <DIR> log4net.2.0.0
03/25/2014 05:40 PM <DIR> Microsoft.AspNet.Mvc.4.0.30506.0
03/25/2014 05:40 PM <DIR> Microsoft.AspNet.Razor.2.0.30506.0
03/25/2014 05:40 PM <DIR> Microsoft.AspNet.WebPages.2.0.30506.0
03/25/2014 05:40 PM <DIR> Microsoft.Bcl.1.0.19
03/25/2014 05:40 PM <DIR> Microsoft.Bcl.Async.1.0.16
03/25/2014 05:40 PM <DIR> Microsoft.Bcl.Build.1.0.10
03/25/2014 05:40 PM <DIR> Microsoft.Net.Http.2.1.10
03/25/2014 05:40 PM <DIR> Microsoft.Web.Infrastructure.1.0.0.0
03/25/2014 05:40 PM <DIR> Moq.4.0.10827
03/25/2014 05:40 PM <DIR> Moq.4.1.1309.1617
03/25/2014 05:40 PM <DIR> Newtonsoft.Json.5.0.8
03/25/2014 05:40 PM <DIR> NUnit.2.6.2
03/25/2014 05:40 PM <DIR> Zlib.Portable.1.9.2
Related
I am using macOS 10.15.2 Catalina and I followed the Installation Guide for macOS.
I completely followed the Installation Guide and still I am unable to debug.
Anyone encountered the same? or know how to fix it?
Many thanks.
Yasir
$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$-$
Adding more details below for #Rudi
When I try to install to install OMNet++ 6 pre 5 and do make, I am getting following error and it seems that OMNet++ 6 pre 5 is also not tested for macOS Catalina 10.15.
===== Compiling qtenv ====
messageanimator.cc
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:80:1: error: expected expression
public:
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:484:31: error: 'QGraphicsItem' is not a class, namespace, or enumeration
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsItem::GraphicsItemFlags)
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:24: note: 'QGraphicsItem' declared here
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:485:1: error: expected expression
Q_DECLARE_INTERFACE(QGraphicsItem, "org.qt-project.Qt.QGraphicsItem")
^
/usr/local/include/QtCore/qobject.h:529:65: note: expanded from macro 'Q_DECLARE_INTERFACE'
template <> inline const char *qobject_interface_iid<IFace *>() \
^
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:485:1: error: expected unqualified-id
/usr/local/include/QtCore/qobject.h:529:67: note: expanded from macro 'Q_DECLARE_INTERFACE'
template <> inline const char *qobject_interface_iid<IFace *>() \
^
In file included from messageanimator.cc:17:
In file included from ./messageanimator.h:26:
In file included from /Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/QGraphicsRectItem:1:
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:51: error: expected ';' after top level declarator
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:595:53: error: expected unqualified-id
class Q_WIDGETS_EXPORT QAbstractGraphicsShapeItem : public QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:42: error: expected ';' after top level declarator
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:620:44: error: expected unqualified-id
class Q_WIDGETS_EXPORT QGraphicsPathItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:653:24: error: variable has incomplete type 'class Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsRectItem : public QAbstractGraphicsShapeItem
^
/Users/yasir/omnetpp-6.0pre5/tools/macosx/include/QtWidgets/qgraphicsitem.h:78:7: note: forward declaration of 'Q_WIDGETS_EXPORT'
class Q_WIDGETS_EXPORT QGraphicsItem
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [Makefile:83: /Users/yasir/omnetpp-6.0pre5/out/clang-release/src/qtenv/messageanimator.o] Error 1
make[1]: *** [Makefile:121: qtenv] Error 2
make: *** [Makefile:35: allmodes] Error 2
Have you tried also OMNeT++ 6 pre 5? It contains an lldbmi wrapper executable that would use system provided lldb instead of gdb which may fix a lot of potential problems (and may cause other ones). But it would worth a try.
Even if you get gdb signed properly on macOS it will not support dynamic loading so it would be more or less useless (unless you build everything statically).
I try to execute the examle.cpp file of Project-OSRM. I did the following steps:
build OSRM from source as described here
in new terminal: cd osrm-backend/example
in the terminal: cmake ..
in the terminal: cmake --build .
in the terminal: sudo cmake --build . --target install
move the maps contractor, engine, extractor, partition, storage, util from /usr/local/include/osrm to /usr/local/include (else error maps are not in /usr/local/include)
in the terminal: g++ -std=c++11 example.cpp -o example
But I get the error
‘underlying_type_t’ in namespace ‘std’ does not name a template type
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>
Does anyone have a idea what I'm doing wrong or what is going wrong and how to solve this?
Error message
In file included from /usr/local/include/engine/api/match_parameters.hpp:31:0,
from /usr/local/include/osrm/match_parameters.hpp:31,
from example.cpp:1:
/usr/local/include/engine/api/route_parameters.hpp: In function ‘bool osrm::engine::api::operator&(osrm::engine::api::RouteParameters::AnnotationsType, osrm::engine::api::RouteParameters::AnnotationsType)’:
/usr/local/include/engine/api/route_parameters.hpp:144:26: error: ‘underlying_type_t’ in namespace ‘std’ does not name a template type
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(l
^
/usr/local/include/engine/api/route_parameters.hpp:144:43: error: expected ‘>’ before ‘<’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(l
^
/usr/local/include/engine/api/route_parameters.hpp:144:43: error: expected ‘(’ before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:144:43: error: expected primary-expression before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:144:76: error: expected primary-expression before ‘>>’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) &
^
/usr/local/include/engine/api/route_parameters.hpp:145:26: error: ‘underlying_type_t’ in namespace ‘std’ does not name a template type
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(r
^
/usr/local/include/engine/api/route_parameters.hpp:145:43: error: expected ‘>’ before ‘<’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(r
^
/usr/local/include/engine/api/route_parameters.hpp:145:43: error: expected ‘(’ before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:145:43: error: expected primary-expression before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:145:76: error: expected primary-expression before ‘>>’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
^
/usr/local/include/engine/api/route_parameters.hpp:145:84: error: expected ‘)’ before ‘;’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
^
/usr/local/include/engine/api/route_parameters.hpp:145:84: error: expected ‘)’ before ‘;’ token
/usr/local/include/engine/api/route_parameters.hpp: In function ‘osrm::engine::api::RouteParameters::AnnotationsType osrm::engine::api::operator|(osrm::engine::api::RouteParameters::AnnotationsType, osrm::engine::api::RouteParameters::AnnotationsType)’:
/usr/local/include/engine/api/route_parameters.hpp:152:26: error: ‘underlying_type_t’ in namespace ‘std’ does not name a template type
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(l
^
/usr/local/include/engine/api/route_parameters.hpp:152:43: error: expected ‘>’ before ‘<’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(l
^
/usr/local/include/engine/api/route_parameters.hpp:152:43: error: expected ‘(’ before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:152:43: error: expected primary-expression before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:152:76: error: expected primary-expression before ‘>>’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) |
^
/usr/local/include/engine/api/route_parameters.hpp:153:26: error: ‘underlying_type_t’ in namespace ‘std’ does not name a template type
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(r
^
/usr/local/include/engine/api/route_parameters.hpp:153:43: error: expected ‘>’ before ‘<’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(r
^
/usr/local/include/engine/api/route_parameters.hpp:153:43: error: expected ‘(’ before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:153:43: error: expected primary-expression before ‘<’ token
/usr/local/include/engine/api/route_parameters.hpp:153:76: error: expected primary-expression before ‘>>’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
^
/usr/local/include/engine/api/route_parameters.hpp:153:84: error: expected ‘)’ before ‘;’ token
static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
^
/usr/local/include/engine/api/route_parameters.hpp:153:84: error: expected ‘)’ before ‘;’ token
underlying_type_t requires C++14. To be able to use it pass -std=c++14 to your compiler.
Don't forget to
#include <type_traits>
This missing directive also lead to the same (confusing) error message.
I am trying to solve an integer linear program using SCIP. The beta version that I require (for exact solving) is given at:
http://scip.zib.de/#exact
As linked there, the source code is at:
http://scip.zib.de/download.php?fname=scip-3.0.0-ex.tgz
I followed the INSTALL file. It requires the installation of EGlib 2.6.20. However, this installation fails during 'make' with the following error:
phani#OptiPlex-9030-AIO ~/EGlib-2.6.20 $ make
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
Building include/EGlib.h
Compiling src/eg_bit.c
Compiling src/eg_compare.c
Compiling src/eg_io.c
src/eg_io.c: In function ‘EGioGets’:
src/eg_io.c:618:7: warning: unused variable ‘b’ [-Wunused-variable]
char*b = buf;
^
src/eg_io.c: In function ‘EGioEof’:
src/eg_io.c:648:6: warning: unused variable ‘err’ [-Wunused-variable]
int err;
^
src/eg_io.c: In function ‘EGmvar’:
src/eg_io.c:42:2: warning: second parameter of ‘va_start’ not last named argument [-Wvarargs]
va_start (largs, nind);
^
Compiling src/eg_lpnum.c
Compiling src/eg_net.c
Compiling src/eg_random.c
Compiling src/eg_macros.c
Compiling src/eg_ehash.c
Compiling src/eg_perm_it.c
Compiling src/eg_symtab.c
Compiling src/eg_keytab.c
Compiling src/eg_simula.c
In file included from src/eg_simula.c:25:0:
src/eg_simula.h:227:2: error: unknown type name ‘dbl_EGeHeapCn_t’
dbl_EGeHeapCn_t heap_cn;/**< connector in the heap containing the agent */
^
src/eg_simula.h:240:2: error: unknown type name ‘dbl_EGeHeap_t’
dbl_EGeHeap_t hp; /**< Heap containing events to be processed */
^
src/eg_simula.c: In function ‘EGsimExp’:
src/eg_simula.c:29:30: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimExp(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimUniform’:
src/eg_simula.c:40:34: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimUniform(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimNormal’:
src/eg_simula.c:51:33: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimNormal(const double t, void*const data)
^
In file included from src/eg_simula.c:25:0:
src/eg_simula.c: In function ‘EGsimNewEvent’:
src/eg_simula.h:277:2: warning: implicit declaration of function ‘dbl_EGeHeapCnInit’ [-Wimplicit-function-declaration]
dbl_EGeHeapCnInit(&(__EGsimA->heap_cn));\
^
src/eg_simula.c:73:2: note: in expansion of macro ‘EGsimSetAgent’
EGsimSetAgent(la,sim->cur_time + gen->gen(sim->cur_time,gen->data));
^
src/eg_simula.c:74:13: error: request for member ‘val’ in something not a structure or union
la->heap_cn.val = la->last_time;
^
src/eg_simula.c:77:12: error: request for member ‘sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:77:26: error: request for member ‘max_sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:78:3: warning: implicit declaration of function ‘dbl_EGeHeapResize’ [-Wimplicit-function-declaration]
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:78:39: error: request for member ‘sz’ in something not a structure or union
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:80:9: warning: implicit declaration of function ‘dbl_EGeHeapAdd’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapAdd(&(sim->hp),&(la->heap_cn));
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c:85:55: error: request for member ‘val’ in something not a structure or union
MESSAGE(EG_SIM_VERBOSE,"new Agent at %lf",la->heap_cn.val);
^
src/eg_macros.h:246:18: note: in definition of macro ‘MESSAGE’
fprintf(stderr,__VA_ARGS__);\
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c: In function ‘EGsim’:
src/eg_simula.c:284:22: warning: implicit declaration of function ‘dbl_EGeHeapGetMin’ [-Wimplicit-function-declaration]
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_macros.h:134:56: note: in definition of macro ‘EGcontainerOf’
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_macros.h:134:55: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_simula.c:284:8: note: in expansion of macro ‘EGcontainerOf’
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_simula.c:285:30: error: request for member ‘val’ in something not a structure or union
sim->cur_time = ca->heap_cn.val;
^
src/eg_simula.c:327:17: error: request for member ‘val’ in something not a structure or union
na->heap_cn.val = sim->cur_time + cn->gen(sim->cur_time,cn->data);
^
src/eg_simula.c:328:6: warning: implicit declaration of function ‘dbl_EGeHeapSiftUp’ [-Wimplicit-function-declaration]
dbl_EGeHeapSiftUp(&(sim->hp),&(na->heap_cn));
^
src/eg_simula.c:365:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:371:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:377:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
src/eg_simula.c:381:12: warning: implicit declaration of function ‘dbl_EGeHeapSiftDown’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapSiftDown(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:388:5: warning: implicit declaration of function ‘dbl_EGeHeapDel’ [-Wimplicit-function-declaration]
dbl_EGeHeapDel(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:429:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:433:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:441:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
Makefile.library:38: recipe for target 'obj/eg_simula.o' failed
make[1]: *** [obj/eg_simula.o] Error 1
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
Makefile:23: recipe for target 'library' failed
make: *** [library] Error 2
After some searching, I have noticed that dbl_EGeHeap_t is not defined in the source code, and that seems to be throwing errors.
On searching online, it seems to be the case that it was defined in EGlib 2.6.15 (https://conexo.dii.uchile.cl/SVN/EGlib/EGlib2/tags/EGlib-2.6.15/TEmplate/dbl_eg_eheap.h), but the corresponding file in 2.6.20 does not have the definition.
Has anybody else experienced this? I badly need a solution to this.
I'm trying to install RMagick 2.15.4 on RHEL 6.7 using Ruby 2.0.0 and ImageMagick 7.0.2.
I've installed ImageMagick7, ImageMagick7-c++, ImageMagick7-c++-devel, ImageMagick7-devel, ImageMagick7-libs packages, made a symlinks:
ln -s /usr/include/ImageMagick-7/MagickCore/ /usr/include/ImageMagick-7/magick
ln -s /usr/include/ImageMagick-7/MagickWand/ /usr/include/ImageMagick-7/wand
And launched install:
C_INCLUDE_PATH=/usr/include/ImageMagick-7/ gem install rmagick
But got this errors:
======================================================================
Thu 16Jun16 05:08:41
This installation of RMagick 2.15.4 is configured for
Ruby 2.0.0 (x86_64-linux) and ImageMagick 7.0.2
======================================================================
Configured compile options: {:magick_config=>false, :pkg_config=>true, :magick_version=>"7.0.2", :local_libs=>" -lMagickCore-7.Q16HDRI ", :cflags=>" -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 ", :cppflags=>" -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 ", :ldflags=>" -lMagickCore-7.Q16HDRI ", :defs=>[], :config_h=>"Makefile rmagick.h"}
make "DESTDIR="
compiling rmmontage.c
In file included from rmmontage.c:14:
rmagick.h:1210: error: expected declaration specifiers or ‘...’ before ‘MagickPixelPacket’
rmagick.h:1219: warning: parameter names (without types) in function declaration
rmagick.h:1224: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
rmagick.h:1240: warning: parameter names (without types) in function declaration
rmagick.h:1253: warning: parameter names (without types) in function declaration
rmagick.h:1289: error: expected declaration specifiers or ‘...’ before ‘MagickPixelPacket’
rmmontage.c: In function ‘Montage_background_color_eq’:
rmmontage.c:110: warning: passing argument 1 of ‘Color_to_PixelPacket’ from incompatible pointer type
rmagick.h:1209: note: expected ‘struct PixelPacket *’ but argument is of type ‘struct PixelInfo *’
rmmontage.c: In function ‘Montage_border_color_eq’:
rmmontage.c:131: warning: passing argument 1 of ‘Color_to_PixelPacket’ from incompatible pointer type
rmagick.h:1209: note: expected ‘struct PixelPacket *’ but argument is of type ‘struct PixelInfo *’
rmmontage.c: In function ‘Montage_fill_eq’:
rmmontage.c:215: warning: passing argument 1 of ‘Color_to_PixelPacket’ from incompatible pointer type
rmagick.h:1209: note: expected ‘struct PixelPacket *’ but argument is of type ‘struct PixelInfo *’
rmmontage.c: In function ‘Montage_matte_color_eq’:
rmmontage.c:353: error: ‘MontageInfo’ has no member named ‘matte_color’
rmmontage.c: In function ‘Montage_stroke_eq’:
rmmontage.c:416: warning: passing argument 1 of ‘Color_to_PixelPacket’ from incompatible pointer type
rmagick.h:1209: note: expected ‘struct PixelPacket *’ but argument is of type ‘struct PixelInfo *’
make: *** [rmmontage.o] Error 1
I checked all developer dependencies on https://rubygems.org/gems/rmagick/versions/2.15.4, and they was satisfied.
How to fix this?
Thanks.
I want to bind a callback, which will be called by a thread outside the Wt event loop.
So obviously I want to use Wt::WServer::post, but I don't get how WApplication::bind should be used, since it's a nonstatic function.
First attempt was this:
auto loaded_callback = [](const decltype(Wt::WApplication::sessionId) &session){
Wt::WServer::post(session,
Wt::WApplication::bind(&table_model::member_func),)
};
Which of course didn't work because bind is nonstatic. However my next attempt
auto object_protect_bind =
Wt::WApplication::instance()->bind(&order_aggregate_table_model::load_future_in_map);
failed with a shitload of compiler errors
Error 153 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int \boost\function\function_template.hpp 922 1 MDDB_Web
Error 156 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int \boost\function\function_template.hpp 926 1 MDDB_Web
Error 160 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int \boost\function\function_template.hpp 927 1 MDDB_Web
Error 150 error C2903: 'apply' : symbol is neither a class template nor a function template \boost\function\function_template.hpp 922 1 MDDB_Web
Error 162 error C2825: 'manager_type': must be a class or namespace when followed by '::' \boost\function\function_template.hpp 934 1 MDDB_Web
Error 154 error C2653: 'handler_type' : is not a class or namespace name \boost\function\function_template.hpp 926 1 MDDB_Web
Error 158 error C2653: 'handler_type' : is not a class or namespace name \boost\function\function_template.hpp 927 1 MDDB_Web
Error 164 error C2275: 'manager_type' : illegal use of this type as an expression \boost\function\function_template.hpp 934 1 MDDB_Web
Error 165 error C2146: syntax error : missing '}' before identifier 'manage' \boost\function\function_template.hpp 934 1 MDDB_Web
Error 159 error C2146: syntax error : missing ';' before identifier 'manager_type' \boost\function\function_template.hpp 927 1 MDDB_Web
Error 155 error C2146: syntax error : missing ';' before identifier 'invoker_type' \boost\function\function_template.hpp 926 1 MDDB_Web
Error 152 error C2143: syntax error : missing ';' before '<' \boost\function\function_template.hpp 922 1 MDDB_Web
Error 163 error C2039: 'manage' : is not a member of '`global namespace'' \boost\function\function_template.hpp 934 1 MDDB_Web
Error 151 error C2039: 'apply' : is not a member of 'boost::detail::function::get_invoker0' \boost\function\function_template.hpp 922 1 MDDB_Web
Error 166 error C1903: unable to recover from previous error(s); stopping compilation \boost\function\function_template.hpp 934 1 MDDB_Web
while the overall solution I had in mind was:
auto sessionId = Wt::WApplication::instance()->sessionId();
auto server_ptr = Wt::WServer::instance();
auto object_protect_bind = Wt::WApplication::instance()->bind(&order_aggregate_table_model::load_future_in_map);
auto inner_bind = std::bind(object_protect_bind, this);
auto loaded_callback = []
(Wt::WServer* server,
const std::string &session,
boost::function<void()> widget_bind)
-> void {
server->post(session, widget_bind, boost::function<void()>());
};
this->data_future =
std::async(std::launch::async,
table_model::load_quiet_a_bunch_of_data,
query, database, std::bind(loaded_callback, server_ptr, sessionId, inner_bind));
Wt::WTimer::singleShot(20 * 1000, this, &table_model::load_future_in_map);
Any suggestions?
Thanks to Koen Deforche in the official forum, the problem was:
Wt::WApplication::bind is supposed to take the already binded method, not the method itself.
Also there is a surprising (for me at least) template detail when using lambdas, so for the sake of an example, my solution for a callback, used by a data loading thread, is:
static std::map<decltype(views::measurements_grouped_by_orders::order_number),
order_value>
order_aggregate_table_model::async_load_order_values(
const odb::query<views::measurements_grouped_by_orders> &query,
std::shared_ptr<odb::database> mddb,
std::function<void(void)> callback) {...
if (callback){ callback(); }
return map;
}
void order_aggregate_table_model::get_data(const odb::query<views::measurements_grouped_by_orders> &query){
auto sessionId = Wt::WApplication::instance()->sessionId();
auto server_ptr = Wt::WServer::instance();
auto object_protect_bind =
Wt::WApplication::instance()->bind(/*Wt::WApplication::bind
handles the case that
the widget might already been destroyed*/
std::bind(&order_aggregate_table_model::load_future_in_map,this));
auto loaded_callback = []
(Wt::WServer* server,
const std::string &session,
std::function<void()> widget_bind)
-> void {
server->post(session, widget_bind, boost::function<void()>());
//Wt::Server::post handles the case when the session is already been destroyed
};
std::function<void()> final_callback = //Because of template quirks had to stick the type
std::bind(loaded_callback, server_ptr, sessionId, object_protect_bind);
this->order_aggregate_map_future =
std::async(std::launch::async,
order_aggregate_table_model::async_load_order_values,
query, this->mddb, final_callback);
Wt::WTimer::singleShot(30 * 1000, this,
&order_aggregate_table_model::load_future_in_map); //For the case that the async loader crashed
}