CMake ignores $CC and $CXX? - opencv

I am trying to compile OpenCV from source on Windows 10 because I thought this to be the way to incorporate the surface matching module into the library. I tried to follow the installation instructions here but when I try to execute the installOCV.sh from inside the gitbash like described, it fails halfway when CMake tries to testcompile with the C and C++ compiler. The script output is this:
$ ./installOCV.sh
Already up to date.
Current branch master is up to date.
Already up to date.
Current branch master is up to date.
/c/lib/Build/opencv /c/lib
-- Selecting Windows SDK version to target Windows 10.0.17134.
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:131 (project):
No CMAKE_CXX_COMPILER could be found.
CMake Error at CMakeLists.txt:131 (project):
No CMAKE_C_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/lib/Build/opencv/CMakeFiles/CMakeOutput.log".
See also "C:/lib/Build/opencv/CMakeFiles/CMakeError.log".
and CMakeError.log displays the following (sorry German):
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Der Buildvorgang wurde am 18.01.2019 15:09:13 gestartet.
Projekt "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
Das Verzeichnis "Debug\" wird erstellt.
Das Verzeichnis "Debug\CompilerIdCXX.tlog\" wird erstellt.
InitializeBuildStatus:
"Debug\CompilerIdCXX.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP /errorReport:queue CMakeCXXCompilerId.cpp
TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
Die Erstellung des Projekts "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.
Fehler beim Buildvorgang.
"C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warnung(en)
1 Fehler
Verstrichene Zeit 00:00:00.26
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Der Buildvorgang wurde am 18.01.2019 15:09:14 gestartet.
Projekt "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
Das Verzeichnis "Debug\" wird erstellt.
Das Verzeichnis "Debug\CompilerIdCXX.tlog\" wird erstellt.
InitializeBuildStatus:
"Debug\CompilerIdCXX.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TP /errorReport:queue CMakeCXXCompilerId.cpp
TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
Die Erstellung des Projekts "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.
Fehler beim Buildvorgang.
"C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warnung(en)
1 Fehler
Verstrichene Zeit 00:00:00.26
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Der Buildvorgang wurde am 18.01.2019 15:09:14 gestartet.
Projekt "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
Das Verzeichnis "Debug\" wird erstellt.
Das Verzeichnis "Debug\CompilerIdC.tlog\" wird erstellt.
InitializeBuildStatus:
"Debug\CompilerIdC.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /errorReport:queue CMakeCCompilerId.c
TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj]
Die Erstellung des Projekts "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.
Fehler beim Buildvorgang.
"C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj]
0 Warnung(en)
1 Fehler
Verstrichene Zeit 00:00:00.28
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R)-Buildmodul, Version 14.0.25420.1
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Der Buildvorgang wurde am 18.01.2019 15:09:15 gestartet.
Projekt "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" auf Knoten "1" (Standardziele).
PrepareForBuild:
Das Verzeichnis "Debug\" wird erstellt.
Das Verzeichnis "Debug\CompilerIdC.tlog\" wird erstellt.
InitializeBuildStatus:
"Debug\CompilerIdC.tlog\unsuccessfulbuild" wird erstellt, da "AlwaysCreate" angegeben wurde.
ClCompile:
CL.exe /c /nologo /W0 /WX- /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /errorReport:queue CMakeCCompilerId.c
TRACKER : Fehler TRK0005: Fehler beim Suchen von "CL.exe". Das System kann die angegebene Datei nicht finden.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj]
Die Erstellung des Projekts "C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" ist abgeschlossen (Standardziele) -- FEHLER.
Fehler beim Buildvorgang.
"C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj" (Standardziel) (1) ->
(ClCompile Ziel) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): error MSB6006: "CL.exe" wurde mit dem Code 5 beendet. [C:\lib\Build\opencv\CMakeFiles\3.13.3\CompilerIdC\CompilerIdC.vcxproj]
0 Warnung(en)
1 Fehler
Verstrichene Zeit 00:00:00.27
Obviously neither $CC nor $CXX are taken into consideration by CMake, although they exist:
$ echo $CC
c:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx64/x64/cl.exe
mark#zws103 MINGW64 /c/lib
$ echo $CXX
c:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.11.25503/bin/Hostx64/x64/cl.exe
PS: of course there could be some problem with spaces in filenames, but I tried gcc with a no-space path and the result was literally the same.
$ $CC
bash: c:/Program: No such file or directory
mark#zws103 MINGW64 /c/lib
$ "$CC"
Microsoft (R) C/C++-Optimierungscompiler Version 19.11.25508.2 f¦r x64
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.
Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]

CMake is a two step process. The first step creates a set of makefiles or project files that can be used by the compiler. In this case you want to create MS Visual Studio project files.
The basic CMake commands are:
cmake <path to CMakelists.txt"> -G "<the type of compiler I want to use>" [Lots of other parameter options]
cmake --build <path to project files> [lots of other options]
The first line creates the build files needed by the compiler. The generator flag -G specifies the compiler being used. The project file creation also searches for any needed libraries, etc to ensure that the build will work.
The second line does the actual compiling.
The InstallOCV.sh script just sets up a lot of these params for you but it is essentially doing the above two calls in a slightly more complicated way.

Try and download C and C++ compilers via MinGW.
The files would be named gcc.exe and g++.exe for C and C++ respectively. Add them to the environment path variable and then execute your shell file.
I hope this helps!

Related

i get error when i am trying to get update to install docker on Debian

when i am trying to get update to install docker on Debian 10 i get Errors
Ign:2 https://download.docker.com/linux/debian buster InRelease
Fehl:3 https://download.docker.com/linux/debian buster Release
Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 52.85.183.164 443]
OK:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease
OK:4 http://cdn-fastly.deb.debian.org/debian buster InRelease
OK:5 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease
Paketlisten werden gelesen... Fertig
E: Das Depot »https://download.docker.com/linux/debian buster Release« enthält keine Release-Datei.
N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.
N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
I had the same error, when I experimented with certificates.
I would recommend to reproduce the steps recommended in Docker install Debian
Did you import any certificates on your own?

cordova -Error vs-tac when I try compile iOS remote

I have a solution on Cordova 6.3 on Visual Studio 2017, my remote agent is a local MacBook Pro. I can connect to remote agent, because i see the conection Ok, but, I can't compile because I has seeing an error.
-----------------------------------------------------------------------------
Enviando la compilación al servidor de compilación remoto
-------------------------------------------------------------------------
------ Compilación incremental: False
------ Enviando nueva solicitud de compilación a: https://MACBOOKPRO-4526:3000/cordova/build/tasks?command=build&vcordova=6.3.1&cfg=debug
1> MSBUILD : cordova-build error : Se produjo un error al cargar al servidor de compilación https://MACBOOKPRO-4526:3000/cordova/build/tasks?command=build&vcordova=6.3.1&cfg=debug: Se excedió el tiempo de espera de la operación
------ 07/21/2017 18:26:51 Comprobando el estado de la compilación desde [Intento 1]
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: Error inesperado en la tarea "VsTac".
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: System.ArgumentNullException: El valor no puede ser nulo.
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: Nombre del parámetro: requestUriString
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en System.Net.WebRequest.Create(String requestUriString)
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.RemoteBuild.CreateWebRequest(String url)
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.RemoteBuild.PollForBuildComplete(String buildingUrl, Int32 interval, Int32 attempts)
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.RemoteBuild.Build()
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.VsTac.BuildPlatform()
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.VsTac.Execute()
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1> C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: en Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Compilación terminada del destino "BuildMDA" en el proyecto "ResarApp2016 v2.jsproj" -- ERROR.
I has tried reinstall npm remotebuild and npm cordova, reinstall xcode too, but i can't compile.
Can you help me?
Regards from Mexico,

Compiling Error using CGAL and GMP

maybe someone can help me get this working. For creating meshes out from pointclouds I installed CGAL 4.7 on Win7 x64 and after using Cmake I successfully compiled it using VS2012.
In a test project i want to build an example found on CGAL docs http://doc.cgal.org/latest/Advancing_front_surface_reconstruction/Advancing_front_surface_reconstruction_2reconstruction_surface_mesh_8cpp-example.html
In my project i linked/included CGAL and boost and the gmp library (that one that comes with the CGAL install). But if compiling this little test still i get this error message:
1> ConsoleApplication1.cpp
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_add" in Funktion ""class CGAL::Gmpq __cdecl CGAL::operator+(class CGAL::Gmpq const &,class CGAL::Gmpq const &)" (??HCGAL##YA?AVGmpq#0#AEBV10#0#Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_clear" in Funktion ""public: __cdecl CGAL::Gmpq_rep::~Gmpq_rep(void)" (??1Gmpq_rep#CGAL##QEAA#XZ)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_cmp" in Funktion ""public: bool __cdecl CGAL::Gmpq::operator<(class CGAL::Gmpq const &)const " (??MGmpq#CGAL##QEBA_NAEBV01##Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_init" in Funktion ""public: __cdecl CGAL::Gmpq_rep::Gmpq_rep(void)" (??0Gmpq_rep#CGAL##QEAA#XZ)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_mul" in Funktion ""class CGAL::Gmpq __cdecl CGAL::operator*(class CGAL::Gmpq const &,class CGAL::Gmpq const &)" (??DCGAL##YA?AVGmpq#0#AEBV10#0#Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_set_d" in Funktion ""public: __cdecl CGAL::Gmpq::Gmpq(double)" (??0Gmpq#CGAL##QEAA#N#Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpq_sub" in Funktion ""class CGAL::Gmpq __cdecl CGAL::operator-(class CGAL::Gmpq const &,class CGAL::Gmpq const &)" (??GCGAL##YA?AVGmpq#0#AEBV10#0#Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpn_add_n" in Funktion "__gmpn_add".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpn_mul" in Funktion ""struct CGAL::Mpzf __cdecl CGAL::operator*(struct CGAL::Mpzf const &,struct CGAL::Mpzf const &)" (??DCGAL##YA?AUMpzf#0#AEBU10#0#Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpn_sqr" in Funktion ""struct CGAL::Mpzf __cdecl CGAL::Mpzf_square(struct CGAL::Mpzf const &)" (?Mpzf_square#CGAL##YA?AUMpzf#1#AEBU21##Z)".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpn_sub_n" in Funktion "__gmpn_sub".
1>ConsoleApplication1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp___gmpn_copyi" in Funktion ""public: __cdecl CGAL::Mpzf::Mpzf(struct CGAL::Mpzf const &)" (??0Mpzf#CGAL##QEAA#AEBU01##Z)".
1>C:\Users\cap\documents\visual studio 2012\Projects\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe : fatal error LNK1120: 12 nicht aufgelöste Externe
So i suspect there are still some dependencys missing, but which ones?
Thanks in advance
forgot the command lines:
c/c++
/Yu"stdafx.h" /GS /W3 /Zc:wchar_t /I"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\auxiliary\gmp\include" /I"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\build\include" /I"C:\Users\cap\Documents\cpp_libraries\boost_1_54_0" /I"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\include" /Zi /Gm /Od /sdl /Fd"x64\Debug\vc110.pdb" /fp:precise /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /MDd /Fa"x64\Debug\" /EHsc /nologo /Fo"x64\Debug\" /Fp"x64\Debug\ConsoleApplication1.pch"
linker:
/OUT:"C:\Users\cap\documents\visual studio 2012\Projects\ConsoleApplication1\x64\Debug\ConsoleApplication1.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Users\cap\documents\visual studio 2012\Projects\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb" /DYNAMICBASE "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X64 /INCREMENTAL /PGD:"C:\Users\cap\documents\visual studio 2012\Projects\ConsoleApplication1\x64\Debug\ConsoleApplication1.pgd" /SUBSYSTEM:CONSOLE /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"x64\Debug\ConsoleApplication1.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\auxiliary\gmp\lib" /LIBPATH:"C:\Users\cap\Documents\cpp_libraries\boost_1_54_0\lib64-msvc-11.0" /LIBPATH:"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\build\lib" /TLBID:1
In Visual Studio 2015 (and I assume in Visual Studio 2012) you need to specify the actual lib files in addition to the directories where to look for those files (as explained here: When to use the Visual Studio Additional dependencies?).
Looking at your linker command, I see that you have specified the directory to the GMP/MPFR libs (/LIBPATH:"C:\Users\cap\Documents\cpp_libraries\CGAL-4.7\auxiliary\gmp\lib), but you also need to specify the actual lib files by adding them to the /DYNAMICBASE list:
/DYNAMICBASE "libgmp-10.lib" "libmpfr-4.lib" "kernel32.lib" "user32.lib" ...

opencv 2.4.5 compilation errors (gpu_info.cpp)

first of all I want to congratulate all the people that helps to make this site so unique and helpful as it is.
After that little introduction here is my question:
I'm trying to compile the last OpenCV version on Ubuntu 12.04 (32 bits) and I'm always getting the next errors:
**/home/srt/opencv/modules/core/src/gpu_info.cpp:468:34: error: no hay una función miembro ‘int cv::gpu::DeviceInfo::minor() const’ declarada en la clase ‘cv::gpu::DeviceInfo’**
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-unnamed-type-template-args" [activado por defecto]
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-delete-non-virtual-dtor" [activado por defecto]
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-narrowing" [activado por defecto]
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/gpu_info.cpp.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-unnamed-type-template-args" [activado por defecto]
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-delete-non-virtual-dtor" [activado por defecto]
cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-narrowing" [activado por defecto]
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
I tried uninstalling FFMPEG and using different cmake flags but nothing changes. I also tried searching on the web for related problems but I only found the FFMPEG recommendation but nothing about the gpu_info.cpp. Is this file necessary for the compilation or I should try to exclude it from it somehow?
(I followed this tutorial for installing all the necessary files: http://www.ozbotz.org/opencv-installation/
and here I found a similar question but none of the recommendations worked for me: http://stackoverflow.com/questions/16321616/opencv-2-4-5-make-error )
Thanks in advance.
You are using master branch. This a developer branch for next major release. So it contain new features, API changes and can be unstable. If you want to use stable version of OpenCV use 2.4 branch or 2.4.x releases.
As for this error, there is a pull request with patch to fix gpu_info.cpp compilation:
https://github.com/Itseez/opencv/pull/1036. But it isn't merged yet.
UPDATE
You can merge this fix in your repository:
git remote add jet47 git#github.com:jet47/opencv.git
git fetch jet47
git merge jet47/fix-gpu-deviceinfo

Azure could not find Reference to EntityFramework

My ASP.NET MVC 4 app is running perfectly on IIS and in IEExpress Environment.
Unfortunately it seems to have a problem with different Versions of EntityFramework.
All references are double and tripple checked for occurences of EF 4.1.0.0. All is unsing EF 4.3.0.0 right now.
Somewhere the system seems to have a reference to 4.1.0.0 and its trying to find it. With no success.
All related external libs are marked as "copy local=true"
Microsoft.WindowsAzure.ServiceRuntime Critical: 201 : Role entrypoint could not be created:
System.TypeLoadException: Unable to load the role entry point due to the following exceptions:
-- System.IO.FileLoadException: Die Datei oder Assembly "EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)
Dateiname: "EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
=== Zustandsinformationen vor Bindung ===
LOG: Benutzer = COREI7\markus
LOG: DisplayName = EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
(Fully-specified)
LOG: Appbase = file:///D:/Dev/TFS/BettrFit/BettrFit.Azure/csx/Debug/roles/BettrFit/approot/bin
LOG: Ursprünglicher PrivatePath = D:\Dev\TFS\BettrFit\BettrFit.Azure\csx\Debug\roles\BettrFit\approot\bin
Aufruf von Assembly : System.Web.Http.Data.EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Es wurde keine Anwendungskonfigurationsdatei gefunden.
LOG: Die Hostkonfigurationsdatei wird verwendet:
LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319 \config\machine.config wird verwendet.
LOG: Verweis nach der Richtlinie: EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
LOG: Download von neuem URL file:///D:/Dev/TFS/BettrFit/BettrFit.Azure/csx/Debug/roles/BettrFit/approot/bin/EntityFramework.DLL.
WRN: Der Vergleich des Assemblynamens führte zum Konflikt: Nebenversion.
ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.
---> System.Reflection.ReflectionTypeLoadException: Mindestens ein Typ in der Assembly kann nicht geladen werden. Rufen Sie die LoaderExceptions-Eigenschaft ab, wenn Sie weitere Informationen benötigen.
bei System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
bei System.Reflection.RuntimeModule.GetTypes()
bei System.Reflection.Assembly.GetTypes()
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
--- Ende der internen Ausnahmestapelüberwachung ---
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetRoleEntryPoint(Assembly entryPointAssembly)
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.CreateRoleEntryPoint(RoleType roleTypeEnum)
bei Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
Das Programm "[2372] WaIISHost.exe: Verwaltet (v4.0.30319)" wurde mit Code -1 (0xffffffff) beendet.
Hope you guys could give some hints on how to fix this problem.
I investigated the Data.EntityFramework assembly:
Assembly a = System.Reflection.Assembly.Load("System.Web.Http.Data.EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
foreach (AssemblyName i in a.GetReferencedAssemblies())
{
Trace.TraceInformation("Ref Assemblies:" + i.Name+" "+i.Version);
}
It shows that its depending upon EntityFramework 4.1.0.0 as the default.
How could I change that?
The Web.Config seems to be not used at loading time - here I tried the rebinding already.
I fixed it via supplying an app.config file with my Web-Role Project.
It seems that the Azure Startup-Code is using an App.Config file instead of the usually used Web.Config.
My app.config adds the runtime/assemplyreferences redirect binding code.
Please try to use assembly redirection to redirect 4.1.0.0 to 4.3.0.0:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0 - 4.2.0.0" newVersion="4.3.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Best Regards,
Ming Xu.

Resources