Boost library files not recognized although included in PATH - c++

Boost library header files were included in PATH AND SYMBOLS but building the program generates an error message:
10:27:13 **** Incremental Build of configuration gcc-debug for project DB8 ****
make MODE=debug CONFIGNAME=gcc-debug all
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `mkdir -p "out/gcc-debug/" && echo "-g -Wall - I/usr/include -fno-stack-protector -DXMLPARSER=libxml -DWITH_PARSIM - DWITH_NETBUILDER -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include" -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn" -IC:/local/boost_1_59_0/boost -I. - IC:/Users/LuisH.Forchesatto/Downloads/omnetpp-4.6/include" >out/gcc-debug//.last- copts'
defaultSensor.cc
In file included from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/connection.h:33:0,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:30,
from dbWriteWin.h:6,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/warning.h:40:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning (disable : 4290)
^
In file included from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/variant.h:38:0,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/connection.h:35,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:30,
from dbWriteWin.h:6,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:48:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning (disable : 4290)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:52:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(push)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:53:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(disable: 4275)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:58:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(pop)
^
In file included from dbWriteWin.h:6:0,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:31:32: fatal error: boost/shared_ptr.hpp: No such file or directory
#include <boost/shared_ptr.hpp>
^
compilation terminated.
make: *** [out/gcc-debug//defaultSensor.o] Error 1
Makefile:94: recipe for target 'out/gcc-debug//defaultSensor.o' failed
10:27:14 Build Finished (took 1s.183ms)
The library is installed in the system, the folder/file exists in the computer and it's path is correct. What can be causing this error?
Contents of path and symbols:
https://dl.dropboxusercontent.com/u/85576999/paths%20and%20symbols.png
Contents of the boost library folder:
https://dl.dropboxusercontent.com/u/85576999/boost%20folder.png

Do not use spaces in paths. I suggest moving (or reinstalling) MySQL Connector libraries to the folder with simple name without spaces, for example: c:\mysqlconnector.
Check whether the path to boost is set for C++ language too - on the Path and Symbols screen there is Assembly language focused.
Take into account these cluses provided by Rudi.

Related

clang fails to build libc++ (redefine nothrow_t, new, delete, new[], delete[] ) against new MSVC 2019 and Windows SDK 10.0.17763.0

It seems there are 5 symbols conflicted: nothrow_t, new, delete, new[], delete[]
[2/37] Building CXX object lib\CMakeFiles\cxx_shared.dir\__\src\algorithm.cpp.obj
FAILED: lib/CMakeFiles/cxx_shared.dir/__/src/algorithm.cpp.obj
C:\PROGRA~1\LLVM\bin\clang-cl.exe /nologo -TP -DNDEBUG -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -D_ALLOW_MSC_VER_MISMATCH -D_CRTBLD -D_CRT_SECURE_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -IC:\Users\User\AppData\Roaming\libcxx-master\include -fms-compatibility-version=19.00 --target=x86_64--windows -D_LIBC_NO_VCRUNTIME -D_LIBCPP_NO_VCRUNTIME /MD /O2 /Ob2 /DNDEBUG /std:c++14 -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wno-user-defined-literals -Wno-covered-switch-default -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++11-compat -Wno-undef -Wno-reserved-id-macro -Wno-gnu-include-next -Wno-gcc-compat -Wno-zero-as-null-pointer-constant -Wno-deprecated-dynamic-exception-spec -Wno-sign-conversion -Wno-old-style-cast -Wno-deprecated -Wno-shift-sign-overflow -Wno-double-promotion -Wno-error -EHsc /Zl /showIncludes /Folib\CMakeFiles\cxx_shared.dir\__\src\algorithm.cpp.obj /Fdlib\CMakeFiles\cxx_shared.dir\ -c C:\Users\User\AppData\Roaming\libcxx-master\src\algorithm.cpp
In file included from C:\Users\User\AppData\Roaming\libcxx-master\src\algorithm.cpp:10:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\random:1645:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\istream:163:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\ostream:137:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\ios:215:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\__locale:23:
In file included from C:\Users\User\AppData\Roaming\libcxx-master\include\support/win32/locale_win32.h:15:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\xlocinfo.h:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\yvals.h:9:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt\crtdbg.h:13:
In file included from C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\vcruntime_new_debug.h:10:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\include\vcruntime_new.h(34,16): error: redefinition of 'nothrow_t'
struct nothrow_t {
^
C:\Users\User\AppData\Roaming\libcxx-master\include\new(123,25): note: previous definition is here
struct _LIBCPP_TYPE_VIS nothrow_t {};
^
This is my CMAKE. (also tried 19.20)
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Ninja/ninja.exe"
-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe"
-DCMAKE_C_FLAGS="-fms-compatibility-version=19.00 --target=x86_64--windows -D_LIBC_NO_VCRUNTIME"
-DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe"
-DCMAKE_CXX_FLAGS="-fms-compatibility-version=19.00 --target=x86_64--windows -D_LIBC_NO_VCRUNTIME -D_LIBCPP_NO_VCRUNTIME"
-DCMAKE_C_LINK_EXECUTABLE="C:/Program Files/LLVM/bin/lld-link.exe"
-DCMAKE_CXX_LINK_EXECUTABLE="C:/Program Files/LLVM/bin/lld-link.exe"
-DLLVM_USE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe"
-DLLVM_PATH="C:/Program Files/LLVM" -DLIBCXX_ENABLE_SHARED=YES
-DLIBCXX_ENABLE_STATIC=NO -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=YES
"C:/Users/User/AppData/Roaming/libcxx-master"
This is my SDK
set LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\lib\x64;
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\ucrt\x64;
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64
Can I make it work? Where to send issue to whom?
I face the same issue with VS2019.
I removed no_runtime flags but set
-DCMAKE_C_LINK_EXECUTABLE="lld-link.exe -flavor link" ^
-DCMAKE_CXX_LINK_EXECUTABLE="lld-link.exe -flavor link" ^
Added -flavor link and it linked successfully. I did not test exceptions but test program with std::thread compiles and runs same as with cl compiler.
UPD: basic try-catch with std::exception thrown works
UPD: full cmake batch (your paths may vary!)
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM="D:/Programming/ninja-build/ninja.exe" ^
-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER="clang-cl.exe" ^
-DCMAKE_C_FLAGS="-fms-compatibility-version=19.00 --target=x86_64--windows" ^
-DCMAKE_CXX_COMPILER="clang-cl.exe" ^
-DCMAKE_CXX_FLAGS="-fms-compatibility-version=19.00 --target=x86_64--windows " ^
-DCMAKE_C_LINK_EXECUTABLE="lld-link.exe -flavor link" ^
-DCMAKE_CXX_LINK_EXECUTABLE="lld-link.exe -flavor link" ^
-DLLVM_USE_LINKER="lld-link.exe" ^
-DLLVM_PATH="C:/Program Files/LLVM" -DLIBCXX_ENABLE_SHARED=YES ^
-DLIBCXX_ENABLE_STATIC=NO -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=YES ^
"D:\Programming\cpp_sandbox\libcxx-9.0.0.src"

make opencv on windows,get a error

I using cmake and mingw-w64 to make opencv on windows 10,however,i get a error when make it on 97%.
there are error report:
[ 96%] Built target opencv_videostab
[ 97%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.obj
In file included from C:/PROGRA~1/Python36/include/Python.h:8:0,
from D:\Program Files (x86)\OpenCv_3.2.0\opencv\sources\modules\python\src2\cv2.cpp:6:
C:/PROGRA~1/Python36/include/pyconfig.h:379:5: warning: "_MSC_VER" is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1800
^~~~~~~~
In file included from D:/Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/math.h: 36:0,
from C:/PROGRA~1/Python36/include/pyport.h:194,
from C:/PROGRA~1/Python36/include/Python.h:50,
from D:\Program Files (x86)\OpenCv_3.2.0\opencv\sources\modules\python\src2\cv2.cpp:6:
D:/Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/cmath:42:10: fatal error: D:/ Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/cpp_type_traits.h>: Invalid argument
#include <bits/cpp_type_traits.h>s
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: ***[modules\python3\CMakeFiles\opencv_python3.dir\build.make:180: modules/python3/CMakeFiles/ope ncv_python3.dir/__/src2/cv2.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:6794: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
mingw32-make: *** [Makefile:160: all] Error 2
What can i do to slove it?
update:
i had sloved it,it's a bug fot mingww64,the error erport
:cmath:42:10: fatal error: D:/ Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/cpp_type_traits.h>: Invalid argument #include <bits/cpp_type_traits.h>s
said having a error to head file,so i just delete the 's' after include statement,that is include <bits/cpp_type_traits.h>

getting No such file or directory when I try to build chromium

I am getting following when I try to build chromium
c:\src\chromium\src>ninja -C out\Default2 chrome
ninja: Entering directory `out\Default2'
[6/28555] CXX obj/base/base_static/pe_image.obj
FAILED: obj/base/base_static/pe_image.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_static/pe
_image.obj.rsp /c ../../base/win/pe_image.cc /Foobj/base/base_static/pe_image.ob
j /Fd"obj/base/base_static_cc.pdb"
c:\src\chromium\src\base\win\pe_image.cc(8): fatal error C1083: Cannot open incl
ude file: 'stddef.h': No such file or directory
[7/28555] CXX obj/base/base_paths/base_paths.obj
FAILED: obj/base/base_paths/base_paths.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_paths/bas
e_paths.obj.rsp /c ../../base/base_paths.cc /Foobj/base/base_paths/base_paths.ob
j /Fd"obj/base/base_paths_cc.pdb"
c:\src\chromium\src\base\files\file_path.h(105): fatal error C1083: Cannot open
include file: 'stddef.h': No such file or directory
[8/28555] CXX obj/base/base_paths/base_paths_win.obj
FAILED: obj/base/base_paths/base_paths_win.obj
ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Stu
dio 14.0\VC\BIN\amd64/cl.exe" /nologo /showIncludes /FC #obj/base/base_paths/bas
e_paths_win.obj.rsp /c ../../base/base_paths_win.cc /Foobj/base/base_paths/base_
paths_win.obj /Fd"obj/base/base_paths_cc.pdb"
c:\program files (x86)\windows kits\10\include\10.0.10586.0\um\winnt.h(34): fata
l error C1083: Cannot open include file: 'ctype.h': No such file or directory
[11/28555] ACTION //base:build_date(//build/toolchain/win:x64)
ninja: build stopped: subcommand failed.
This is my first time building chroium,
I have visual studio 2015 community edition installed with Windows SDK , and also installed WDK seperately without which "gn gen out/Default2" was not working
Any idea what this issue could be
1.Your build errors:
c:\src\chromium\src\base\win\pe_image.cc(8): fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
c:\src\chromium\src\base\files\file_path.h(105): fatal error C1083: Cannot openinclude file: 'stddef.h': No such file or directory
c:\program files (x86)\windows kits\10\include\10.0.10586.0\um\winnt.h(34): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
2.You may need to check the header files which caused the build errors:
The headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK.
Excerpt from the above:
Visual C++ SDK. The headers, sources, and libraries are now distributed as part of a separate Universal CRT SDK. This SDK is included with Visual Studio; it is installed by default to C:\Program Files (x86)\Windows Kits\10. The debug ucrtbased.dll is also included as part of this SDK and is installed to the system directory.
3.You can also try to reference the following links, it's the same issue with yours:

Can I install raspicam c++ libraries on OS X?

I'm developing an OpenCV project that will run on a raspberry pi. So far I have been developing on a Mac in Xcode and all is going well. I recently realized that in order to tap into the raspberry pi camera I will need to use the raspicam library.
My question is, can I install raspicam libraries on OS X or are they raspberry pi hardware specific?
I would like to be able to develop, compile, and build on my Mac as well as compile and build on the raspberry pi. I am trying to avoid doing my development on the Pi.
If that's not possible do you have any recommendations for how I should manage the development setup for this project?
There is only a small section of my code that requires the raspicam libraries so I am not opposed to having a flag that executes the raspicam code if running on the Pi, otherwise executes the currently working OpenCV code if running on the Mac.
So far I have downloaded the raspicam source and I have done:
cd raspicam-0.1.3
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="/usr/local/Cellar/opencv3/3.1.0_3/share/OpenCV" ..
And here is the output:
-- Adding cv library
--
-- -------------------------------------------------------------------------------
-- General configuration for raspicam 0.1.2
-- -------------------------------------------------------------------------------
--
Built as dynamic libs?:ON
Compiler:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- C++ flags (Release): -std=c++0x -Wl,--no-as-needed -lpthread
-- C++ flags (Debug): -std=c++0x -Wl,--no-as-needed -lpthread
-- CMAKE_CXX_FLAGS: -std=c++0x -Wl,--no-as-needed
-- CMAKE_BINARY_DIR: /Users/andres/Downloads/raspicam-0.1.3/build
--
-- CMAKE_SYSTEM_PROCESSOR = x86_64
-- BUILD_SHARED_LIBS = ON
-- BUILD_UTILS = ON
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_MODULE_PATH = /usr/local/lib/cmake/;/usr/lib/cmake
--
-- CREATE OPENCV MODULE=1
-- CMAKE_INSTALL_PREFIX=/usr/local
-- REQUIRED_LIBRARIES=
--
--
-- Change a value with: cmake -D<Variable>=<Value>
--
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
raspicam
raspicam_cv
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/andres/Downloads/raspicam-0.1.3/build
Then
make
Output:
Scanning dependencies of target raspicam_cv
[ 5%] Building CXX object src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o
clang: warning: -Wl,--no-as-needed: 'linker' input unused
clang: warning: -lpthread: 'linker' input unused
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:297:22: error:
use of undeclared identifier 'CLOCK_REALTIME'
if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
^
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:307:13: error:
use of undeclared identifier 'sem_timedwait'
ret = sem_timedwait( sem, &ts );
^
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:327:13: warning:
'sem_init' is deprecated [-Wdeprecated-declarations]
int rc = sem_init(sem, 0, initial_count);
^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked
deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
^
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:335:13: warning:
'sem_destroy' is deprecated [-Wdeprecated-declarations]
int rc = sem_destroy(sem);
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly
marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:520:13: warning:
'sem_init' is deprecated [-Wdeprecated-declarations]
int rc = sem_init(&event->sem, 0, 0);
^
/usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked
deprecated here
int sem_init(sem_t *, int, unsigned int) __deprecated;
^
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:525:7: warning:
'sem_destroy' is deprecated [-Wdeprecated-declarations]
sem_destroy(&event->sem);
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly
marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:541:8: warning:
'sem_getvalue' is deprecated [-Wdeprecated-declarations]
if (sem_getvalue(&event->sem, &value) != 0)
^
/usr/include/sys/semaphore.h:54:5: note: 'sem_getvalue' has been explicitly
marked deprecated here
int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated;
^
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/raspicam_cv.cpp:39:
In file included from /Users/andres/Downloads/raspicam-0.1.3/src/./private/private_impl.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal.h:363:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/mmal/mmal_common.h:40:
In file included from /Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/vcos.h:116:
/Users/andres/Downloads/raspicam-0.1.3/dependencies/vcos/pthreads/vcos_platform.h:582:13: warning:
'sem_destroy' is deprecated [-Wdeprecated-declarations]
int rc = sem_destroy(&event->sem);
^
/usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly
marked deprecated here
int sem_destroy(sem_t *) __deprecated;
^
6 warnings and 2 errors generated.
make[2]: *** [src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/raspicam_cv.dir/all] Error 2
make: *** [all] Error 2
The solution I came up with was to use:
#ifdef __ARM__
include <raspicam/raspicam.h>
#endif
and in the main
#ifdef __ARM__
// pi specific camera initialization code
#elif __APPLE__
// osx specific camera initialization code
#endif
These preprocessors will be evaluated before the code is compiled. If the source is being compiled on the pi (ARM architecture) the __ARM__ sections will be compiled, otherwise if the source code is being compiled on osx the __APPLE__ sections will be compiled.

MinGW “The procedure entry point libintl_setlocale could not be located …”

I have problem building a project under Windows 7 64bit. I already looked similar questions on SO, but didn't found proper solution. When I run:
cmake -v -G "MSYS Makefiles" CMakeLists.txt
it gives me following output:
> -- The C compiler identification is unknown
-- Check for working C compiler: c:/MinGW/bin/gcc.exe
-- Check for working C compiler: c:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCo
mpiler.cmake:61 (message):
The C compiler "c:/MinGW/bin/gcc.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programmi
ng/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec1735268707/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1735268707.dir/build.make
CMakeFiles/cmTryCompileExec1735268707.dir/build
make[1]: Entering directory
`/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMak
eFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/testCCompiler.c
make[1]: ***
[CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1
make[1]: Leaving directory
Also I get next error message 3 times, during compilation attempt, it says "The procedure entry point libintl_setlocale could not be located in the library libintl-8.dll"
CMakeError.log:
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec2453403923/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec2453403923.dir/build.make
CMakeFiles/cmTryCompileExec2453403923.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/c/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
make[1]: *
[CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj] Error
1 make: * [cmTryCompileExec2453403923/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec78678067/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec78678067.dir/build.make
CMakeFiles/cmTryCompileExec78678067.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
* [CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj] Error 1 make: * [cmTryCompileExec78678067/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -Aa
The output was: 1 :0:1: error: missing '(' after
predicate
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler": gcc.exe: fatal error: no input files compilation
terminated. Determining if the C compiler works failed with the
following output: Change Dir:
C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
"cmTryCompileExec1735268707/fast" /usr/bin/make -f
CMakeFiles/cmTryCompileExec1735268707.dir/build.make
CMakeFiles/cmTryCompileExec1735268707.dir/build make[1]: Entering
directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
"/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles
1 Building C object
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj
/c/MinGW/bin/gcc.exe -o
CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c
/C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c
make[1]: ***
[CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error
1 make[1]: Leaving directory
/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec1735268707/fast] Error 2
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags:
The output was: 1
Compiling the C compiler identification source file
"CMakeCCompilerId.c" failed. Compiler: c:/MinGW/bin/gcc.exe Build
flags: Id flags: -c
The output was: 1
Also my Path Environment Variable:
C:\Program Files (x86)\PC Connectivity Solution\;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files
(x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files
(x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS
Client\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files
(x86)\AMD
APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program
Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program
Files\Sony\VAIO Improvement\;C:\Program Files (x86)\Sony\VAIO Startup
Setting Tool;C:\Program Files (x86)\Windows Live\Shared;c:\Program
Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program
Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft
SQL Server\100\DTS\Binn\;C:\Program Files
(x86)\MVActiveX\;C:\Java\jdk1.7.0_09\bin;C:\Program
Files\Microsoft\Web Platform Installer\;C:\Program Files
(x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files
(x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program
Files\TortoiseHg\;C:\Program
Files\MATLAB\R2013a\runtime\win64;C:\Program
Files\MATLAB\R2013a\bin;C:\MinGW\bin;C:\Program Files (x86)\CMake\bin
I installed and reinstalled mingw and investigated my path variable, but still have no solution. Any ideas, where I am wrong?
I just found the answer to this: I had another libintl-8.dll in my path.
Do this from the command line:
where libintl-8.dll
Then rename ALL of them except the one in the MinGW tree.
If that fails, then a reinstall of your MinGW tree may be needed. Good luck.
Drop libintl-8.dll in System32/SysWOW64 and it should work fine.
This is a somewhat ignorant guess, but the problem with libintl-8.dll could arise from path issues. Somewhere in your path, you could have an older version of the lib with different entrypoints. Make sure you have the latest version of MinGW and all relevant libraries, and then try moving MinGW\bin to the top of your path variable.
For another example of what appears to be this problem in action, see: MinGW "The procedure entry point libiconv could not be located ..."
The answer in that linked question helped me resolve a similar problem I was having.