Errors building Paraview with gcc on OSX - objective-c

I'm trying to build Paraview on OSX 10.10.5 with gcc 5.3.0.
When building Vtk I get:
[ 24%] Building CXX object
VTK/Rendering/OpenGL/CMakeFiles/vtkRenderingOpenGL.dir/vtkCocoaRenderWindowInteractor.mm.o
In file included from /usr/include/os/object.h:75:0,
from /usr/include/dispatch/dispatch.h:48,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from /Users/Leo/projects/ParaView/VTK/Rendering/OpenGL/vtkCocoaRenderWindowInteractor.mm:16:
/usr/include/objc/NSObject.h:22:4: error: 'instancetype' does not name
a type
- (instancetype)self;
^ /usr/include/objc/NSObject.h:36:4: error: 'instancetype' does not name a type
- (instancetype)retain OBJC_ARC_UNAVAILABLE;
^ /usr/include/objc/NSObject.h:38:4: error: 'instancetype' does not name a type
- (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
^ /usr/include/objc/NSObject.h:60:4: error: 'instancetype' does not name a type
- (instancetype)init;
^ /usr/include/objc/NSObject.h:62:4: error: 'instancetype' does not name a type + (instancetype)new;
^ /usr/include/objc/NSObject.h:63:4: error: 'instancetype' does not name a type + (instancetype)allocWithZone:(struct _NSZone *)zone;
^ /usr/include/objc/NSObject.h:64:4: error: 'instancetype' does not name a type + (instancetype)alloc;
^ In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:0,
from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
from /Users/Leo/projects/ParaView/VTK/Rendering/OpenGL/vtkCocoaRenderWindowInteractor.mm:16:
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:59:42:
error: expected ')' before '(' token
- (void)enumerateObjectsUsingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block NS_AVAILABLE(10_6, 4_0);
^ /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:59:42:
error: expected identifier before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:59:42:
error: expected ';' before '(' token
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:60:81:
error: expected ')' before '(' token
- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (^)(id obj, NSUInteger idx, BOOL *stop))block
NS_AVAILABLE(10_6, 4_0);
All errors come from OSX headers /System/Library/Frameworks/Foundation.framework/Headers/NS....h
I know that GCC doesn't recognize Objective-C Blocks (^), and here I found that GCC doesn't understand instancetype.
Is there any way to build Paraview on OSX with gcc, should I just deactivate Vtk?

Related

Which version of protocol buffers does TensorFlow 1.1 depend on?

It is unclear which version of protocol buffers TensorFlow 1.1 depends on.
The pip package built by TensorFlow 1.1 depends on protobuf >= 3.2.
The TensorFlow installation instructions for Ubuntu reference protobuf 3.1.
Furthermore, attempting to build TensorFlow 1.1 from source whilst using protobuf 3.1, 3.2, or 3.3 built from source fails.
I can build TensorFlow 1.1 from source as long as I allow it to build its own copy of protobuf but I would rather it used a common version if possible.
If I build protobuf 3.1 from source and then attempt to build TensorFlow 1.1 from source I get the following error:
ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:73:1: C++ compilation of rule '#protobuf//:protobuf_lite' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 45 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/wire_format_lite.cc:393:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteFloatArray(const float*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:398:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteDoubleArray(const double*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:403:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteFixed32Array(const uint32*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:408:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteFixed64Array(const uint64*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:413:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteSFixed32Array(const int32*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:418:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteSFixed64Array(const int64*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:423:66: error: no 'void google::protobuf::internal::WireFormatLite::WriteBoolArray(const bool*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
io::CodedOutputStream* output) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc: In static member function 'static void google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(int, const google::protobuf::MessageLite&, google::protobuf::io::CodedOutputStream*)':
external/protobuf/src/google/protobuf/wire_format_lite.cc:557:17: error: 'class google::protobuf::io::CodedOutputStream' has no member named 'IsSerializationDeterministic'
output->IsSerializationDeterministic(), target);
^
external/protobuf/src/google/protobuf/wire_format_lite.cc: In static member function 'static void google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(int, const google::protobuf::MessageLite&, google::protobuf::io::CodedOutputStream*)':
external/protobuf/src/google/protobuf/wire_format_lite.cc:574:17: error: 'class google::protobuf::io::CodedOutputStream' has no member named 'IsSerializationDeterministic'
output->IsSerializationDeterministic(), target);
^
external/protobuf/src/google/protobuf/wire_format_lite.cc: At global scope:
external/protobuf/src/google/protobuf/wire_format_lite.cc:739:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::Int32Size(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:813:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::int32)
inline size_t WireFormatLite::Int32Size(int32 value) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:748:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::UInt32Size(const google::protobuf::RepeatedField<unsigned int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:819:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::UInt32Size(google::protobuf::uint32)
inline size_t WireFormatLite::UInt32Size(uint32 value) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:757:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::SInt32Size(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:825:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::SInt32Size(google::protobuf::int32)
inline size_t WireFormatLite::SInt32Size(int32 value) {
^
external/protobuf/src/google/protobuf/wire_format_lite.cc:766:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::EnumSize(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:831:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::EnumSize(int)
inline size_t WireFormatLite::EnumSize(int value) {
^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
If I build protobuf 3.2 from source and then attempt to build TensorFlow 1.1 from source I get the following error:
ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:113:1: C++ compilation of rule '#protobuf//:protobuf' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 43 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/util/json_util.cc:52:49: error: definition of implicitly-declared 'virtual google::protobuf::util::internal::ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink()'
ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
^
external/protobuf/src/google/protobuf/util/json_util.cc: In member function 'virtual void google::protobuf::util::internal::ZeroCopyStreamByteSink::Append(const char*, size_t)':
external/protobuf/src/google/protobuf/util/json_util.cc:58:16: error: 'buffer_size_' was not declared in this scope
if (len <= buffer_size_) {
^
external/protobuf/src/google/protobuf/util/json_util.cc:59:14: error: 'buffer_' was not declared in this scope
memcpy(buffer_, bytes, len);
^
external/protobuf/src/google/protobuf/util/json_util.cc:64:12: error: 'buffer_' was not declared in this scope
memcpy(buffer_, bytes, buffer_size_);
^
external/protobuf/src/google/protobuf/util/json_util.cc:64:28: error: 'buffer_size_' was not declared in this scope
memcpy(buffer_, bytes, buffer_size_);
^
external/protobuf/src/google/protobuf/util/json_util.cc: In function 'google::protobuf::util::Status google::protobuf::util::BinaryToJsonStream(google::protobuf::util::TypeResolver*, const string&, google::protobuf::io::ZeroCopyInputStream*, google::protobuf::io::ZeroCopyOutputStream*, const google::protobuf::util::JsonPrintOptions&)':
external/protobuf/src/google/protobuf/util/json_util.cc:85:47: error: 'const struct google::protobuf::util::JsonPrintOptions' has no member named 'always_print_enums_as_ints'
proto_source.set_use_ints_for_enums(options.always_print_enums_as_ints);
^
Target //tensorflow/tools/pip_package:build_pip_package failed to build
If I build protobuf 3.3 from source and then attempt to build TensorFlow 1.1 from source I get the following error:
ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:73:1: C++ compilation of rule '#protobuf//:protobuf_lite' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 45 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/arenastring.cc:41:6: error: redefinition of 'void google::protobuf::internal::ArenaStringPtr::AssignWithDefault(const string*, google::protobuf::internal::ArenaStringPtr)'
void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value,
^
In file included from external/protobuf/src/google/protobuf/arenastring.cc:34:0:
<snip>/source/protobuf/protobuf-3.3.0/inst/include/google/protobuf/arenastring.h:316:13: note: 'void google::protobuf::internal::ArenaStringPtr::AssignWithDefault(const string*, google::protobuf::internal::ArenaStringPtr)' previously defined here
inline void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value,
^
Target //tensorflow/tools/pip_package:build_pip_package failed to build

Build aruco 2.0.5 on Windows 8

I am trying to install aruco on my Windows machine using cmake 3.5.2 as suggested by the aruco developper.
My config:
Windows8
CMake 3.5.2
ArUco 2.0.5
I can configure and generate successfully aruco in cmake.
Then I go to aruco\build -> right click-> open cmd -> type mingw32-make -> get the following error:
C:\aruco-2.0.5\build>mingw32-make
Scanning dependencies of target aruco
[ 2%] Building CXX object src/CMakeFiles/aruco.dir/ar_omp.cpp.obj
[ 4%] Building CXX object src/CMakeFiles/aruco.dir/cameraparameters.cpp.obj
[ 6%] Building CXX object src/CMakeFiles/aruco.dir/cvdrawingutils.cpp.obj
In file included from C:\aruco-2.0.5\src\aruco.h:149:0,
from C:\aruco-2.0.5\src\cvdrawingutils.h:31,
from C:\aruco-2.0.5\src\cvdrawingutils.cpp:28:
C:\aruco-2.0.5\src\markerdetector.h:160:40: warning: "/*" within comment [-Wcomm
ent]
ARUCO_MIP_36h12, //**** recommended
^
C:\aruco-2.0.5\src\markerdetector.h:212:60: warning: unused parameter 'r2' [-Wun
used-parameter]
void setThresholdParamRange(size_t r1 = 0, size_t r2 = 0) {_params. _thresP
aram1_range = r1; }
^
C:\aruco-2.0.5\src\markerdetector.h:267:30: warning: unused parameter 'val' [-Wu
nused-parameter]
void setDesiredSpeed(int val){}
^
In file included from C:\aruco-2.0.5\src\posetracker.h:33:0,
from C:\aruco-2.0.5\src\aruco.h:150,
from C:\aruco-2.0.5\src\cvdrawingutils.h:31,
from C:\aruco-2.0.5\src\cvdrawingutils.cpp:28:
C:\aruco-2.0.5\src\markermap.h: In member function 'void aruco::Marker3DInfo::to
Stream(std::ostream&)':
C:\aruco-2.0.5\src\markermap.h:49:77: warning: comparison between signed and uns
igned integer expressions [-Wsign-compare]
void toStream(std::ostream &str){str<<id<<" "<<size()<<" ";for(int i=0;i<si
ze();i++) str<<at(i).x<<" "<<at(i).y<<" "<<at(i).z<<" ";}
^
In file included from C:\aruco-2.0.5\src\posetracker.h:33:0,
from C:\aruco-2.0.5\src\aruco.h:150,
from C:\aruco-2.0.5\src\cvdrawingutils.h:31,
from C:\aruco-2.0.5\src\cvdrawingutils.cpp:28:
C:\aruco-2.0.5\src\markermap.h: In member function 'void aruco::Marker3DInfo::fr
omStream(std::istream&)':
C:\aruco-2.0.5\src\markermap.h:50:80: warning: comparison between signed and uns
igned integer expressions [-Wsign-compare]
void fromStream(std::istream &str){int s;str>>id>>s;resize(s);for(int i=0;i
<size();i++) str>>at(i).x>>at(i).y>>at(i).z;}
^
[ 9%] Building CXX object src/CMakeFiles/aruco.dir/dictionary.cpp.obj
In file included from C:\aruco-2.0.5\src\dictionary.cpp:9:0:
C:\aruco-2.0.5\src\markermap.h: In member function 'void aruco::Marker3DInfo::to
Stream(std::ostream&)':
C:\aruco-2.0.5\src\markermap.h:49:77: warning: comparison between signed and uns
igned integer expressions [-Wsign-compare]
void toStream(std::ostream &str){str<<id<<" "<<size()<<" ";for(int i=0;i<si
ze();i++) str<<at(i).x<<" "<<at(i).y<<" "<<at(i).z<<" ";}
^
In file included from C:\aruco-2.0.5\src\dictionary.cpp:9:0:
C:\aruco-2.0.5\src\markermap.h: In member function 'void aruco::Marker3DInfo::fr
omStream(std::istream&)':
C:\aruco-2.0.5\src\markermap.h:50:80: warning: comparison between signed and uns
igned integer expressions [-Wsign-compare]
void fromStream(std::istream &str){int s;str>>id>>s;resize(s);for(int i=0;i
<size();i++) str>>at(i).x>>at(i).y>>at(i).z;}
^
C:\aruco-2.0.5\src\dictionary.cpp: In static member function 'static std::string
aruco::Dictionary::getTypeString(aruco::Dictionary::DICT_TYPES)':
C:\aruco-2.0.5\src\dictionary.cpp:236:11: warning: enumeration value 'ARTAG' not
handled in switch [-Wswitch]
switch(t){
^
C:\aruco-2.0.5\src\dictionary.cpp: In member function 'aruco::MarkerMap aruco::D
ictionary::createMarkerMap(cv::Size, int, int, const std::vector<int>&, bool)':
C:\aruco-2.0.5\src\dictionary.cpp:275:39: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (gridSize.height*gridSize.width!=ids.size())throw cv::Exception(9001, "g
ridSize != ids.size()Invalid ", "Dictionary::createMarkerMap", __FILE__, __LINE_
_);
^
C:\aruco-2.0.5\src\dictionary.cpp:284:23: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (int i=0;i<ids.size();i++) TInfo[i].id=ids[i];
^
C:\aruco-2.0.5\src\dictionary.cpp:285:13: warning: unused variable 'sizeY' [-Wun
used-variable]
int sizeY=gridSize.height*MarkerSize+(gridSize.height-1)*MarkerDistance
;
^
C:\aruco-2.0.5\src\dictionary.cpp:286:13: warning: unused variable 'sizeX' [-Wun
used-variable]
int sizeX=gridSize.width*MarkerSize+(gridSize.width-1)*MarkerDistance;
^
C:\aruco-2.0.5\src\dictionary.cpp:312:37: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (CurMarkerIdx>=ids.size()) throw cv::Exception(999," Fid
ucidalMarkers::createMarkerMapImage_ChessMarkerMap","INTERNAL ERROR. REWRITE THI
S!!",__FILE__,__LINE__);
^
C:\aruco-2.0.5\src\dictionary.cpp:300:13: warning: unused variable 'centerX' [-W
unused-variable]
int centerX=sizeX/2;
^
C:\aruco-2.0.5\src\dictionary.cpp:301:13: warning: unused variable 'centerY' [-W
unused-variable]
int centerY=sizeY/2;
^
C:\aruco-2.0.5\src\dictionary.cpp:303:14: warning: unused variable 'centerData'
[-Wunused-variable]
bool centerData=true;
^
[ 11%] Building CXX object src/CMakeFiles/aruco.dir/ippe.cpp.obj
C:\aruco-2.0.5\src\ippe.cpp: In function 'void IPPE::IPPComputeRotations(double,
double, double, double, double, double, cv::OutputArray, cv::OutputArray)':
C:\aruco-2.0.5\src\ippe.cpp:307:45: warning: variable 'ata10' set but not used [
-Wunused-but-set-variable]
double a00, a01, a10,a11, ata00, ata01, ata10,ata11,b00, b01, b10,b11,binv0
0, binv01, binv10,binv11;
^
C:\aruco-2.0.5\src\ippe.cpp:311:19: warning: variable 'a' set but not used [-Wun
used-but-set-variable]
double b0, b1,a,gamma,dtinv;
^
[ 13%] Building CXX object src/CMakeFiles/aruco.dir/marker.cpp.obj
C:\aruco-2.0.5\src\marker.cpp: In member function 'void aruco::Marker::rotateXAx
is(cv::Mat&)':
C:\aruco-2.0.5\src\marker.cpp:299:22: error: 'M_PI' was not declared in this sco
pe
float angleRad = M_PI / 2;
^
src\CMakeFiles\aruco.dir\build.make:187: recipe for target 'src/CMakeFiles/aruco
.dir/marker.cpp.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/aruco.dir/marker.cpp.obj] Error 1
CMakeFiles\Makefile2:116: recipe for target 'src/CMakeFiles/aruco.dir/all' faile
d
mingw32-make[1]: *** [src/CMakeFiles/aruco.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
C:\aruco-2.0.5\build>mingw32-make
Scanning dependencies of target aruco
[ 2%] Building CXX object src/CMakeFiles/aruco.dir/marker.cpp.obj
C:\aruco-2.0.5\src\marker.cpp: In member function 'void aruco::Marker::rotateXAx
is(cv::Mat&)':
C:\aruco-2.0.5\src\marker.cpp:299:22: error: 'M_PI' was not declared in this sco
pe
float angleRad = M_PI / 2;
^
src\CMakeFiles\aruco.dir\build.make:187: recipe for target 'src/CMakeFiles/aruco
.dir/marker.cpp.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/aruco.dir/marker.cpp.obj] Error 1
CMakeFiles\Makefile2:116: recipe for target 'src/CMakeFiles/aruco.dir/all' faile
d
mingw32-make[1]: *** [src/CMakeFiles/aruco.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
I have also tried to do it with codeblocks but I get the exact same error.
The developer has released a new version 2.0.7 fixing this issue.
What I have done to have aruco:
download the .zip on sourceforge
unzip it
create a build folder in aruco-2.0.7
open cmake-gui configure and generate
go into your build folder
open a cmd window from there
type mingw32-make
The library should have compiled properly.
If omp.h is missing from your compiler, find the source code on the internet and add it to mingw in MinGW\include. You should be ready to go. Don't forget to add aruco to your path & reboot.
If you are using an ide, you will have to add this library since it is an external library but it is another issue.
Finally, you might have some issues regarding c++11. I am working on it. If someone knows how to allow it on mingw (I haven't find any understandable explanation so far)

How to build dash with CMake?

I'm trying to build dash using Clion and CMake but I get this build error:
/opt/clion-2016.1.1/bin/cmake/bin/cmake --build /home/dac/.CLion2016.1/system/cmake/generated/dash-46b33cad/46b33cad/Debug --target all -- -j 4
[ 3%] Building C object CMakeFiles/main.dir/error.c.o
[ 6%] Building C object CMakeFiles/main.dir/eval.c.o
[ 9%] Building C object CMakeFiles/main.dir/cd.c.o
[ 12%] Building C object CMakeFiles/main.dir/arith_yylex.c.o
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.c:54:0:
/home/dac/Downloads/dash-0.5.8/dash/system.h:65:22: error: static declaration of ‘strtod’ follows non-static declaration
static inline double strtod(const char *nptr, char **endptr)
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.c:40:0:
/usr/include/stdlib.h:164:15: note: previous declaration of ‘strtod’ was here
extern double strtod (const char *__restrict __nptr,
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.c:54:0:
/home/dac/Downloads/dash-0.5.8/dash/system.h:86:19: error: static declaration of ‘killpg’ follows non-static declaration
static inline int killpg(pid_t pid, int signal)
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.c:39:0:
/usr/include/signal.h:134:12: note: previous declaration of ‘killpg’ was here
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.c:54:0:
/home/dac/Downloads/dash-0.5.8/dash/system.h:97:0: warning: "_SC_CLK_TCK" redefined
#define _SC_CLK_TCK 2
^
In file included from /usr/include/unistd.h:609:0,
from /home/dac/Downloads/dash-0.5.8/dash/error.c:42:
/usr/include/x86_64-linux-gnu/bits/confname.h:78:0: note: this is the location of the previous definition
#define _SC_CLK_TCK _SC_CLK_TCK
^
CMakeFiles/main.dir/build.make:182: recipe for target 'CMakeFiles/main.dir/error.c.o' failed
make[2]: *** [CMakeFiles/main.dir/error.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/dac/Downloads/dash-0.5.8/dash/eval.c:51:22: fatal error: builtins.h: No such file or directory
In file included from /home/dac/Downloads/dash-0.5.8/dash/arith_yylex.c:44:0:
/home/dac/Downloads/dash-0.5.8/dash/system.h:65:22: error: static declaration of ‘strtod’ follows non-static declaration
static inline double strtod(const char *nptr, char **endptr)
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/arith_yylex.c:36:0:
/usr/include/stdlib.h:164:15: note: previous declaration of ‘strtod’ was here
extern double strtod (const char *__restrict __nptr,
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/arith_yylex.c:44:0:
/home/dac/Downloads/dash-0.5.8/dash/system.h:86:19: error: static declaration of ‘killpg’ follows non-static declaration
static inline int killpg(pid_t pid, int signal)
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/error.h:38:0,
from /home/dac/Downloads/dash-0.5.8/dash/arith_yylex.c:40:
/usr/include/signal.h:134:12: note: previous declaration of ‘killpg’ was here
extern int killpg (__pid_t __pgrp, int __sig) __THROW;
^
In file included from /home/dac/Downloads/dash-0.5.8/dash/syntax.h:5:0,
from /home/dac/Downloads/dash-0.5.8/dash/arith_yylex.c:43:
/home/dac/Downloads/dash-0.5.8/dash/system.h:102:17: error: expected ‘)’ before ‘c’
int isblank(int c);
^
/home/dac/Downloads/dash-0.5.8/dash/system.h:102:5: error: expected expression before ‘)’ token
int isblank(int c);
^
compilation terminated.
CMakeFiles/main.dir/build.make:206: recipe for target 'CMakeFiles/main.dir/eval.c.o' failed
make[2]: *** [CMakeFiles/main.dir/eval.c.o] Error 1
CMakeFiles/main.dir/build.make:134: recipe for target 'CMakeFiles/main.dir/arith_yylex.c.o' failed
make[2]: *** [CMakeFiles/main.dir/arith_yylex.c.o] Error 1
My CMakeLists.txt looks like this:
cmake_minimum_required (VERSION 2.6)
project (dash)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include config.h -DBSD=1 -DSHELL -DIFS_BROKEN")
add_executable(main main.c alias.c arith_yacc.c arith_yylex.c cd.c error.c eval.c exec.c expand.c histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c options.c parser.c redir.c show.c trap.c output.c bltin/printf.c system.c bltin/test.c bltin/times.c var.c alias.h arith_yacc.h bltin/bltin.h cd.h error.h eval.h exec.h expand.h hetio.h init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h show.h system.h trap.h var.h mktokens mkbuiltins builtins.def.in mkinit.c mknodes.c nodetypes nodes.c.pat mksyntax.c mksignames.c)
What can I do to make it build? If I use the makefile and build with make then it builds. But I want to build with CMake.

Use generic implementation of wxDataViewCtrl on OSX

By default wxDataViewCtrl has native implementation under OSX. How can I use generic implementation of wxDataViewCtrl under OSX.
I do not want to make any changes in wxWidgets Code. I would prefer a macro or some specific header.
Also I am thinking how I can use native and generic implementations both at the same time.
Tried the way suggested:
Following errors while building wxWidgets dynamic library:
./src/osx/dataview_osx.cpp:101:38: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Add(parent,item);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:112:38: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Add(parent,items);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:123:26: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item))
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:153:28: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(items[indexItem]),items[indexItem]))
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:178:22: error: no member named 'SetDeleting' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->SetDeleting(true);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:179:38: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,item);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:181:22: error: no member named 'SetDeleting' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->SetDeleting(false);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:197:22: error: no member named 'SetDeleting' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->SetDeleting(true);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:199:38: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
noFailureFlag = m_DataViewCtrlPtr->GetDataViewPeer()->Remove(parent,items);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:201:22: error: no member named 'SetDeleting' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->SetDeleting(false);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:212:26: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item))
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:233:29: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
return m_DataViewCtrlPtr->GetDataViewPeer()->Reload();
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:238:22: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->GetDataViewPeer()->Resort();
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:252:55: error: no member named 'GetColumnPtr' in 'wxDataViewCtrl'; did you mean 'GetColumnAt'?
wxDataViewColumn* column(m_DataViewCtrlPtr->GetColumnPtr(col));
^~~~~~~~~~~~
GetColumnAt
./include/wx/generic/dataview.h:248:23: note: 'GetColumnAt' declared here
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
^
./src/osx/dataview_osx.cpp:267:28: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->GetDataViewPeer()->SetRowHeight(item,height);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:287:57: error: no member named 'GetColumnPtr' in 'wxDataViewCtrl'; did you mean 'GetColumnAt'?
wxDataViewColumn* column(m_DataViewCtrlPtr->GetColumnPtr(col));
^~~~~~~~~~~~
GetColumnAt
./include/wx/generic/dataview.h:248:23: note: 'GetColumnAt' declared here
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
^
./src/osx/dataview_osx.cpp:302:30: error: no member named 'GetDataViewPeer' in 'wxDataViewCtrl'
m_DataViewCtrlPtr->GetDataViewPeer()->SetRowHeight(items[itemIndex],height);
~~~~~~~~~~~~~~~~~ ^
./src/osx/dataview_osx.cpp:312:53: error: no member named 'GetColumnPtr' in 'wxDataViewCtrl'; did you mean 'GetColumnAt'?
wxDataViewColumn *column = m_DataViewCtrlPtr->GetColumnPtr(col);
^~~~~~~~~~~~
GetColumnAt
./include/wx/generic/dataview.h:248:23: note: 'GetColumnAt' declared here
wxDataViewColumn *GetColumnAt(unsigned int pos) const;
^
./src/osx/dataview_osx.cpp:314:20: error: no member named 'GetWidthVariable' in 'wxDataViewColumn'
if ( column->GetWidthVariable() == wxCOL_WIDTH_AUTOSIZE )
~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [advdll_dataview_osx.o] Error 1
#include <wx/generic/dataview.h> ?
You need to globally predefine wxHAS_GENERIC_DATAVIEWCTRL and rebuild both wxWidgets and your application using it.
There is currently no way to use both the native and generic implementations of this control in the same build.
We need to build wxWidgets with both:
wxHAS_GENERIC_DATAVIEWCTRL
wxUSE_GENERICDATAVIEWCTRL
Only wxHAS_GENERIC_DATAVIEWCTRL will not work. Note, now I am able to use the generic implementation of wxWidgets on OSX.

Unknown type name 'namespace' in Xcode 4.2

I am compiling QCAR SDK, but it prompts an error after I added more frameworks to the project.
// Matrices.h
//
#ifndef _QCAR_MATRIX_H_
#define _QCAR_MATRIX_H_
namespace QCAR
{
/// Matrix with 3 rows and 4 columns of float items
struct Matrix34F {
float data[3*4]; ///< Array of matrix items
};
/// Matrix with 4 rows and 4 columns of float items
struct Matrix44F {
float data[4*4]; ///< Array of matrix items
};
} // namespace QCAR
#endif //_QCAR_MATRIX_H_
In the line namespace QCAR, it said Unknown type name 'namespace'.
What should I do?
UPDATE: Here is the build transcript
In file included from ../../build/include/QCAR/Tool.h:18:
In file included from /Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/EAGLView.h:14:
In file included from /Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/ImageTargetsAppDelegate.h:9:
In file included from /Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/CouponBook.m:12:
../../build/include/QCAR/Matrices.h:16:1: error: unknown type name 'namespace' [1]
namespace QCAR
^
../../build/include/QCAR/Matrices.h:16:15: error: expected ';' after top level declarator [1]
namespace QCAR
^
;
fix-it:"../../build/include/QCAR/Matrices.h":{16:15-16:15}:";"
In file included from /Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/ImageTargetsAppDelegate.h:9:
In file included from /Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/CouponBook.m:12:
/Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/EAGLView.h:52:5: error: type name requires a specifier or qualifier [1]
QCAR::Matrix44F projectionMatrix;
^
/Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/EAGLView.h:52:10: error: expected expression [1]
QCAR::Matrix44F projectionMatrix;
^
/Users/Raptor.Kwok/Documents/xCodeProjects/qcar-ios-1-0-0/samples/ImageTargets/ImageTargets/EAGLView.h:52:5:{52:5-52:9}: warning: type specifier missing, defaults to 'int' [-Wimplicit-int,3]
QCAR::Matrix44F projectionMatrix;
^~~~
1 warning and 4 errors generated.
You can rename your file with .mm or you can select your .m file and change the "File Type" to "Objective-C++ Source".
I suspect the translation is C or Objective-C, where namespace is not a keyword as it is in C++ and Objective-C++.
Another possibility is that a previous header did not close a body (e.g. forgotten }; at end of class declaration of forgotten } at end of function definition).