|
I use the print driver pdf995. I go to File/Print and I can print
to PDF.
Is there any way to programmatically check to see if the print queue
for this 'printer' is empty? If its empty, all is well and my software
works fine. But if something is stuck in that print queue, it really
causes chaos. When you go to File/Print, there must be some way of checking
the status of the print queue.
|
|
|
|
|
|
Dear Community!
Concerning a topic that deals with the compilation of a program written in C++ i would like to ask for your support.
Just for information at the beginning: I am a beginner in C++ programming. Most of the things I do in Python, Java and PHP.
However, for writing the master thesis, I have to deal with an open source software where the relevant part is written in C++ where i have to modify one part and now have to compile the folder where the source files are located to a shared library (.so)
The source code is from https://github.com/qgis/QGIS
The file i modified was https://github.com/qgis/QGIS/blob/master/src/analysis/raster/qgskde.cpp
(In the installed version of QGIS, the folder analysis appears just as _analysis.so)
I am working on a MacBook using MacOS 10.15.4 and a Raspberry Pi using Raspbian and have CMake Version 3.4 installed.
The CMakeLists.txt File i try to compile using the command "cmake . --debug-output" (having directed to the directory "..../QGIS-master/src/analysis/" before) is
https://github.com/qgis/QGIS/blob/master/src/analysis/CMakeLists.txt
where i added
cmake_minimum_required(VERSION 3.4.0)
in Line 4.
The output i get when executing the command described above is:
Running with debug output on.
CMake Error at CMakeLists.txt:390 (find_package):
By not providing "FindEXIV2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "EXIV2", but
CMake did not find one.
Could not find a package configuration file provided by "EXIV2" with any of
the following names:
EXIV2Config.cmake
exiv2-config.cmake
Add the installation prefix of "EXIV2" to CMAKE_PREFIX_PATH or set
"EXIV2_DIR" to a directory containing one of the above files. If "EXIV2"
provides a separate development package or SDK, be sure it has been
installed.
Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".
After several attempts of trying to solve this problem using google i don't get any further. I attached the
CMakeOutput.log below.
Can someone give my advice on how i proceed here?
Thanks for any help in advance.
Best regards!
CMakeOutput.log
----------------------------------------------
The system is: Linux - 4.1.19+ - armv6l
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
The C compiler identification is GNU, found in "/home/pi/QGIS-master/src/analysis/CMakeFiles/3.4.0/CompilerIdC/a.out"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
The CXX compiler identification is GNU, found in "/home/pi/QGIS-master/src/analysis/CMakeFiles/3.4.0/CompilerIdCXX/a.out"
Determining if the C compiler works passed with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_4142a/fast"
/usr/bin/make -f CMakeFiles/cmTC_4142a.dir/build.make CMakeFiles/cmTC_4142a.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4142a.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_4142a.dir/testCCompiler.c.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_4142a
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4142a.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_4142a.dir/testCCompiler.c.o -o cmTC_4142a -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_56dec/fast"
/usr/bin/make -f CMakeFiles/cmTC_56dec.dir/build.make CMakeFiles/cmTC_56dec.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o
/usr/bin/cc -o CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.4/Modules/CMakeCCompilerABI.c
Linking C executable cmTC_56dec
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56dec.dir/link.txt --verbose=1
/usr/bin/cc -v CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -o cmTC_56dec -rdynamic
Using built-in specs.
COLLECT_GCC=/usr/bin/cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_56dec' '-rdynamic' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2 --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=both -m armelf_linux_eabi -o cmTC_56dec /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_56dec/fast"]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_56dec.dir/build.make CMakeFiles/cmTC_56dec.dir/build]
ignore line: [make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp']
ignore line: [Building C object CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/bin/cc -o CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake-3.4/Modules/CMakeCCompilerABI.c]
ignore line: [Linking C executable cmTC_56dec]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_56dec.dir/link.txt --verbose=1]
ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -o cmTC_56dec -rdynamic ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/bin/cc]
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper]
ignore line: [Target: arm-linux-gnueabihf]
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file: ignore line: [Thread model: posix]
ignore line: [gcc version 4.6.3 (Debian 4.6.3-14+rpi1) ]
ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/]
ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_56dec' '-rdynamic' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp']
link line: [ /usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2 --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=both -m armelf_linux_eabi -o cmTC_56dec /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o]
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2] ==> ignore
arg [--sysroot=/] ==> ignore
arg [--build-id] ==> ignore
arg [--no-add-needed] ==> ignore
arg [--eh-frame-hdr] ==> ignore
arg [-export-dynamic] ==> ignore
arg [-dynamic-linker] ==> ignore
arg [/lib/ld-linux-armhf.so.3] ==> ignore
arg [-X] ==> ignore
arg [--hash-style=both] ==> ignore
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_56dec] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o] ==> ignore
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6]
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf]
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..]
arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf]
arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf]
arg [CMakeFiles/cmTC_56dec.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
arg [--no-as-needed] ==> ignore
arg [-lc] ==> lib [c]
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
arg [--no-as-needed] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o] ==> ignore
remove lib [gcc]
remove lib [gcc_s]
remove lib [gcc]
remove lib [gcc_s]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6] ==> [/usr/lib/gcc/arm-linux-gnueabihf/4.6]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..] ==> [/usr/lib]
collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf]
collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
implicit libs: [c]
implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/4.6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf]
implicit fwks: []
Detecting C [-std=c1x] compiler features compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_96bfa/fast"
/usr/bin/make -f CMakeFiles/cmTC_96bfa.dir/build.make CMakeFiles/cmTC_96bfa.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_96bfa.dir/feature_tests.c.o
/usr/bin/cc -std=c1x -o CMakeFiles/cmTC_96bfa.dir/feature_tests.c.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/feature_tests.c
Linking C executable cmTC_96bfa
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_96bfa.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_96bfa.dir/feature_tests.c.o -o cmTC_96bfa -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [-std=c99] compiler features compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_77680/fast"
/usr/bin/make -f CMakeFiles/cmTC_77680.dir/build.make CMakeFiles/cmTC_77680.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_77680.dir/feature_tests.c.o
/usr/bin/cc -std=c99 -o CMakeFiles/cmTC_77680.dir/feature_tests.c.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/feature_tests.c
Linking C executable cmTC_77680
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_77680.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_77680.dir/feature_tests.c.o -o cmTC_77680 -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [-std=c90] compiler features compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_3414b/fast"
/usr/bin/make -f CMakeFiles/cmTC_3414b.dir/build.make CMakeFiles/cmTC_3414b.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3414b.dir/feature_tests.c.o
/usr/bin/cc -std=c90 -o CMakeFiles/cmTC_3414b.dir/feature_tests.c.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/feature_tests.c
Linking C executable cmTC_3414b
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3414b.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_3414b.dir/feature_tests.c.o -o cmTC_3414b -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:0c_restrict
Feature record: C_FEATURE:0c_static_assert
Feature record: C_FEATURE:0c_variadic_macros
Determining if the CXX compiler works passed with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_76bfa/fast"
/usr/bin/make -f CMakeFiles/cmTC_76bfa.dir/build.make CMakeFiles/cmTC_76bfa.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_76bfa.dir/testCXXCompiler.cxx.o
/usr/bin/c++ -o CMakeFiles/cmTC_76bfa.dir/testCXXCompiler.cxx.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_76bfa
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_76bfa.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_76bfa.dir/testCXXCompiler.cxx.o -o cmTC_76bfa -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_ecc99/fast"
/usr/bin/make -f CMakeFiles/cmTC_ecc99.dir/build.make CMakeFiles/cmTC_ecc99.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o
/usr/bin/c++ -o CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.4/Modules/CMakeCXXCompilerABI.cpp
Linking CXX executable cmTC_ecc99
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ecc99.dir/link.txt --verbose=1
/usr/bin/c++ -v CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_ecc99 -rdynamic
Using built-in specs.
COLLECT_GCC=/usr/bin/c++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file:Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/
LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ecc99' '-rdynamic' '-shared-libgcc' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp'
/usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2 --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=both -m armelf_linux_eabi -o cmTC_ecc99 /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Parsed CXX implicit link information from above output:
link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command:"/usr/bin/make" "cmTC_ecc99/fast"]
ignore line: [/usr/bin/make -f CMakeFiles/cmTC_ecc99.dir/build.make CMakeFiles/cmTC_ecc99.dir/build]
ignore line: [make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp']
ignore line: [Building CXX object CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o]
ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.4/Modules/CMakeCXXCompilerABI.cpp]
ignore line: [Linking CXX executable cmTC_ecc99]
ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ecc99.dir/link.txt --verbose=1]
ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_ecc99 -rdynamic ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/bin/c++]
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper]
ignore line: [Target: arm-linux-gnueabihf]
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14+rpi1' --with-bugurl=file: ignore line: [Thread model: posix]
ignore line: [gcc version 4.6.3 (Debian 4.6.3-14+rpi1) ]
ignore line: [COMPILER_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/]
ignore line: [LIBRARY_PATH=/usr/lib/gcc/arm-linux-gnueabihf/4.6/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/:/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../:/lib/arm-linux-gnueabihf/:/lib/:/usr/lib/arm-linux-gnueabihf/:/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_ecc99' '-rdynamic' '-shared-libgcc' '-march=armv6' '-mfloat-abi=hard' '-mfpu=vfp']
link line: [ /usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2 --sysroot=/ --build-id --no-add-needed --eh-frame-hdr -export-dynamic -dynamic-linker /lib/ld-linux-armhf.so.3 -X --hash-style=both -m armelf_linux_eabi -o cmTC_ecc99 /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf -L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../.. -L/lib/arm-linux-gnueabihf -L/usr/lib/arm-linux-gnueabihf CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o]
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/collect2] ==> ignore
arg [--sysroot=/] ==> ignore
arg [--build-id] ==> ignore
arg [--no-add-needed] ==> ignore
arg [--eh-frame-hdr] ==> ignore
arg [-export-dynamic] ==> ignore
arg [-dynamic-linker] ==> ignore
arg [/lib/ld-linux-armhf.so.3] ==> ignore
arg [-X] ==> ignore
arg [--hash-style=both] ==> ignore
arg [-m] ==> ignore
arg [armelf_linux_eabi] ==> ignore
arg [-o] ==> ignore
arg [cmTC_ecc99] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crti.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtbegin.o] ==> ignore
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6]
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf]
arg [-L/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..] ==> dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..]
arg [-L/lib/arm-linux-gnueabihf] ==> dir [/lib/arm-linux-gnueabihf]
arg [-L/usr/lib/arm-linux-gnueabihf] ==> dir [/usr/lib/arm-linux-gnueabihf]
arg [CMakeFiles/cmTC_ecc99.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
arg [-lstdc++] ==> lib [stdc++]
arg [-lm] ==> lib [m]
arg [-lgcc_s] ==> lib [gcc_s]
arg [-lgcc] ==> lib [gcc]
arg [-lc] ==> lib [c]
arg [-lgcc_s] ==> lib [gcc_s]
arg [-lgcc] ==> lib [gcc]
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/crtend.o] ==> ignore
arg [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crtn.o] ==> ignore
remove lib [gcc_s]
remove lib [gcc]
remove lib [gcc_s]
remove lib [gcc]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6] ==> [/usr/lib/gcc/arm-linux-gnueabihf/4.6]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
collapse library dir [/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../..] ==> [/usr/lib]
collapse library dir [/lib/arm-linux-gnueabihf] ==> [/lib/arm-linux-gnueabihf]
collapse library dir [/usr/lib/arm-linux-gnueabihf] ==> [/usr/lib/arm-linux-gnueabihf]
implicit libs: [stdc++;m;c]
implicit dirs: [/usr/lib/gcc/arm-linux-gnueabihf/4.6;/usr/lib/arm-linux-gnueabihf;/usr/lib;/lib/arm-linux-gnueabihf]
implicit fwks: []
Detecting CXX [-std=c++0x] compiler features compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_1d8b8/fast"
/usr/bin/make -f CMakeFiles/cmTC_1d8b8.dir/build.make CMakeFiles/cmTC_1d8b8.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_1d8b8.dir/feature_tests.cxx.o
/usr/bin/c++ -std=c++0x -o CMakeFiles/cmTC_1d8b8.dir/feature_tests.cxx.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_1d8b8
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1d8b8.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_1d8b8.dir/feature_tests.cxx.o -o cmTC_1d8b8 -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers
Feature record: CXX_FEATURE:0cxx_alias_templates
Feature record: CXX_FEATURE:0cxx_alignas
Feature record: CXX_FEATURE:0cxx_alignof
Feature record: CXX_FEATURE:0cxx_attributes
Feature record: CXX_FEATURE:0cxx_attribute_deprecated
Feature record: CXX_FEATURE:1cxx_auto_type
Feature record: CXX_FEATURE:0cxx_binary_literals
Feature record: CXX_FEATURE:1cxx_constexpr
Feature record: CXX_FEATURE:0cxx_contextual_conversions
Feature record: CXX_FEATURE:1cxx_decltype
Feature record: CXX_FEATURE:0cxx_decltype_auto
Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types
Feature record: CXX_FEATURE:1cxx_default_function_template_args
Feature record: CXX_FEATURE:1cxx_defaulted_functions
Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:0cxx_delegating_constructors
Feature record: CXX_FEATURE:1cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:1cxx_enum_forward_declarations
Feature record: CXX_FEATURE:1cxx_explicit_conversions
Feature record: CXX_FEATURE:0cxx_extended_friend_declarations
Feature record: CXX_FEATURE:1cxx_extern_templates
Feature record: CXX_FEATURE:0cxx_final
Feature record: CXX_FEATURE:1cxx_func_identifier
Feature record: CXX_FEATURE:1cxx_generalized_initializers
Feature record: CXX_FEATURE:0cxx_generic_lambdas
Feature record: CXX_FEATURE:0cxx_inheriting_constructors
Feature record: CXX_FEATURE:1cxx_inline_namespaces
Feature record: CXX_FEATURE:1cxx_lambdas
Feature record: CXX_FEATURE:0cxx_lambda_init_captures
Feature record: CXX_FEATURE:1cxx_local_type_template_args
Feature record: CXX_FEATURE:1cxx_long_long_type
Feature record: CXX_FEATURE:1cxx_noexcept
Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
Feature record: CXX_FEATURE:1cxx_nullptr
Feature record: CXX_FEATURE:0cxx_override
Feature record: CXX_FEATURE:1cxx_range_for
Feature record: CXX_FEATURE:1cxx_raw_string_literals
Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
Feature record: CXX_FEATURE:0cxx_relaxed_constexpr
Feature record: CXX_FEATURE:0cxx_return_type_deduction
Feature record: CXX_FEATURE:1cxx_right_angle_brackets
Feature record: CXX_FEATURE:1cxx_rvalue_references
Feature record: CXX_FEATURE:1cxx_sizeof_member
Feature record: CXX_FEATURE:1cxx_static_assert
Feature record: CXX_FEATURE:1cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:0cxx_thread_local
Feature record: CXX_FEATURE:1cxx_trailing_return_types
Feature record: CXX_FEATURE:1cxx_unicode_literals
Feature record: CXX_FEATURE:1cxx_uniform_initialization
Feature record: CXX_FEATURE:1cxx_unrestricted_unions
Feature record: CXX_FEATURE:0cxx_user_literals
Feature record: CXX_FEATURE:0cxx_variable_templates
Feature record: CXX_FEATURE:1cxx_variadic_macros
Feature record: CXX_FEATURE:1cxx_variadic_templates
Detecting CXX [-std=c++98] compiler features compiled with the following output:
Change Dir: /home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_7243f/fast"
/usr/bin/make -f CMakeFiles/cmTC_7243f.dir/build.make CMakeFiles/cmTC_7243f.dir/build
make[1]: Entering directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_7243f.dir/feature_tests.cxx.o
/usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_7243f.dir/feature_tests.cxx.o -c /home/pi/QGIS-master/src/analysis/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_7243f
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7243f.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_7243f.dir/feature_tests.cxx.o -o cmTC_7243f -rdynamic
make[1]: Leaving directory '/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeTmp'
Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers
Feature record: CXX_FEATURE:0cxx_alias_templates
Feature record: CXX_FEATURE:0cxx_alignas
Feature record: CXX_FEATURE:0cxx_alignof
Feature record: CXX_FEATURE:0cxx_attributes
Feature record: CXX_FEATURE:0cxx_attribute_deprecated
Feature record: CXX_FEATURE:0cxx_auto_type
Feature record: CXX_FEATURE:0cxx_binary_literals
Feature record: CXX_FEATURE:0cxx_constexpr
Feature record: CXX_FEATURE:0cxx_contextual_conversions
Feature record: CXX_FEATURE:0cxx_decltype
Feature record: CXX_FEATURE:0cxx_decltype_auto
Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types
Feature record: CXX_FEATURE:0cxx_default_function_template_args
Feature record: CXX_FEATURE:0cxx_defaulted_functions
Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:0cxx_delegating_constructors
Feature record: CXX_FEATURE:0cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:0cxx_enum_forward_declarations
Feature record: CXX_FEATURE:0cxx_explicit_conversions
Feature record: CXX_FEATURE:0cxx_extended_friend_declarations
Feature record: CXX_FEATURE:0cxx_extern_templates
Feature record: CXX_FEATURE:0cxx_final
Feature record: CXX_FEATURE:0cxx_func_identifier
Feature record: CXX_FEATURE:0cxx_generalized_initializers
Feature record: CXX_FEATURE:0cxx_generic_lambdas
Feature record: CXX_FEATURE:0cxx_inheriting_constructors
Feature record: CXX_FEATURE:0cxx_inline_namespaces
Feature record: CXX_FEATURE:0cxx_lambdas
Feature record: CXX_FEATURE:0cxx_lambda_init_captures
Feature record: CXX_FEATURE:0cxx_local_type_template_args
Feature record: CXX_FEATURE:0cxx_long_long_type
Feature record: CXX_FEATURE:0cxx_noexcept
Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
Feature record: CXX_FEATURE:0cxx_nullptr
Feature record: CXX_FEATURE:0cxx_override
Feature record: CXX_FEATURE:0cxx_range_for
Feature record: CXX_FEATURE:0cxx_raw_string_literals
Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
Feature record: CXX_FEATURE:0cxx_relaxed_constexpr
Feature record: CXX_FEATURE:0cxx_return_type_deduction
Feature record: CXX_FEATURE:0cxx_right_angle_brackets
Feature record: CXX_FEATURE:0cxx_rvalue_references
Feature record: CXX_FEATURE:0cxx_sizeof_member
Feature record: CXX_FEATURE:0cxx_static_assert
Feature record: CXX_FEATURE:0cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:0cxx_thread_local
Feature record: CXX_FEATURE:0cxx_trailing_return_types
Feature record: CXX_FEATURE:0cxx_unicode_literals
Feature record: CXX_FEATURE:0cxx_uniform_initialization
Feature record: CXX_FEATURE:0cxx_unrestricted_unions
Feature record: CXX_FEATURE:0cxx_user_literals
Feature record: CXX_FEATURE:0cxx_variable_templates
Feature record: CXX_FEATURE:0cxx_variadic_macros
Feature record: CXX_FEATURE:0cxx_variadic_templates
----------------------------------------------
|
|
|
|
|
Did you compile it "before" you started making changes? That way, you know that it worked in the first place. If not, start over.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
No unfortunately not. But I have downloaded the same sourcecode (means kind of "virgin") from github where i didn't implement my changes (which are should not have any impact as it is just a change of a formula in one calculation) and the exact error occurs also.
However, I've worked myself through somehow to get around this exiv2 problem by inserting
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_MODULE_PATH}/home/pi/QGIS-master/src/analysis/")
to the CMakeLists.txt file.
However, i'm stuck at this line now:
Running with debug output on.
-- Found exiv2: /usr/lib/arm-linux-gnueabihf/libexiv2.so
Called from: [2] /home/pi/QGIS-master/src/analysis/FindEXIV2.cmake
[1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
CMake Error at CMakeLists.txt:400 (ADD_FLEX_FILES_PREFIX):
Unknown CMake command "ADD_FLEX_FILES_PREFIX".
Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".
and except finding google solutions that redirect me to the same file or similar ones of the QGIS github project i cant find where it fails now.
Do you have an idea?
Thanks for your time in advance!
|
|
|
|
|
Then check the history of this project. Maybe it never worked (recently).
Anyway, take out some useful part and see if you can compile that. Never met software where I couldn't find something to remove / refactor (or totally rewrite). If you don't understand it, you probably don't need it.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Has anyone tackled moving a project using C++/CLI to target .NET 5?
After struggling with the project settings, I am very close as everything compiles and resolves references now. But, I'm stuck with a useless link error. Adding /VERBOSE and /VERBOSE:CLR don't add any more info.
Just wondering if it's supported or not..
FWIW, here's the link error. There is usually a message after the "(80131195) :"
12>MSVCMRTD_netcore.LIB(mstartup.obj) : error LNK2022: metadata operation failed (80131195) :
12>LINK : fatal error LNK1255: link failed because of metadata errors
12>Done building project "JmpCLR.vcxproj" -- FAILED.
John
modified 5-Jan-21 10:22am.
|
|
|
|
|
I'm interested in this question. Did you find an answer?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Unfortunately not. The best (only) write-up I've found specifically dealing with targeting .NET 5 from C++/CLI code is this one from "Mike" at Microsoft.
Porting a C++/CLI Project to .NET Core
That allowed me to get past some of the early build issues I encountered. But, I still have no way of diagnosing the remaining linker error. I am looking at other changes right now but will return to this sometime soon. I may have to resort to using one of my MSDN Premier tickets on the issues.
|
|
|
|
|
We've run into the same linker problem, porting an application to .net5. Did you ever get a resolution to this issue?
|
|
|
|
|
Hi Doug, No. I've tried various things and each attempt ends up with this inscrutable linker error. I have not opened a MSDN premier support ticket yet due to other work deadlines but I plan to when I can focus on this again. I tried to get help on twitter but all point me to opening a devcommunity ticket + prayer. I will add a reply here if I manage to get further. Please let me know if you find a way to diagnose the issue as well. I plan to try VS 2022 preview 3 which dropped yesterday as well though confidence is not high that they touched the C++/CLI compiler/linker at all since 2017.
|
|
|
|
|
Hi John,
We've narrowed down the problem to the use of gcroot<string^> as a parameter method in an unmanaged class. Using gcroot<exception^> seems to be okay.
See below for a contrived example. Given the nature of the error, it may not be related your problem.
// fails when cpp is compiled with /clr:dotnetcore
// succeeds when cpp is compiled with /clr
#pragma once
#include <vcclr.h>
class UnmanagedClassWithGcHandle
{
public:
int age;
// error LNK2022 : metadata operation failed(80131195) : ( ONLY TARGETING .NET 5.0 )
void foobar(gcroot<system::string^>);
// this is successful
void foobar2(gcroot<system::exception^>);
};
void UnmanagedClassWithGcHandle::foobar(gcroot<system::string^>)
{
}
void UnmanagedClassWithGcHandle::foobar2(gcroot<system::exception^>)
{
}
|
|
|
|
|
We submitted an ticket with Microsoft and they have acknowledged this as a bug. I will update with any additional information.
|
|
|
|
|
If you are also Doug Milne 2021, then you should close one of these accounts.
|
|
|
|
|
Hello everybody
I have modified status bar in CMyMainFrame class to show current time.In fact I have added an Indicator_ID to add a place next to the other 3 default indicators on status bar(Caps lock/Num lock/Scroll lock).
It generally works and show current time, But problem is that current time is updated just when I move the mouse or click somewhere.
How can I update that pragmatically from inside the project?
Best Regards.
|
|
|
|
|
|
Hi,
I'm looking into whether we can move our current C++/CLI (and C#) code to using .NET 5.
One challenge seems to be that my C++/CLI Library project cannot reference a number of the UI classes any more.
For a simple test library, trying to call System::Windows::MessageBox::Show( msg ); results in:
1>C:\Users\john\source\repos\CppNetCoreLib\Widget.cpp(19,20): error C2039: 'MessageBox': is not a member of 'System::Windows'
I have switched to /clr:netcore and net5.0-windows as the target Framework. I can build and run if I don't use WinForms or WPF calls but trying those will fail.
So, I'm left searching for ways to reference those assemblies. But, simply referencing assemblies is no longer the way to add System::* dependencies. Instead, it looks like one must refernce 'Frameworks'. But C++/CLI doesn't support that in the VS IDE.
In C#, the csproj file adds <UseWPF>true</UseWPF> and/or <UseWindowsForms>true</UseWindowsForms >. Those don't seem to have any effect in C++/CLI.
Anyone have ideas or suggestions on what I could try?
John
|
|
|
|
|
I've gotten further. It looks like you need to hand-edit the .vcxproj file and add the proper framework references. For example:
<ItemGroup>
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" />
</ItemGroup>
Alas, now I can compile but am left with unhelpful link errors.
1>MSVCMRTD_netcore.LIB(mstartup.obj) : error LNK2022: metadata operation failed (80131195) :
1>MSVCMRTD_netcore.LIB(mstartup.obj) : error LNK2022: metadata operation failed (80131195) :
1>LINK : fatal error LNK1255: link failed because of metadata errors
|
|
|
|
|
I am trying to apply DESPOT POMDP solver with using given examples to build my own decision making problem and I followed the documentation in the repository to build different relevant classes and functions in the header file
class SimpleState: public State {
public:
int position;
int context;
int time;
SimpleState();
SimpleState(int _position, int _context, int _time) :
rat_position(_position),
context(_context),
time(_time) {
}
SimpleState(int _state_id);
~SimpleState();
std::string text() const;
};
SimpleState::SimpleState() {
}
class StarMazeProblem : public DSPOMDP,
public MDP {
protected:
std::vector<std::vector<std::vector<State> > > transition_probabilities_;
mutable MemoryPool<SimpleState> memory_pool_;
std::vector<SimpleState*> states_;
mutable std::vector<ValuedAction> mdp_policy_;
public:
enum {CENTER = 0, RIGHT = 1, LEFT = 2};
public:
StarMazeProblem();
int NumStates() const;
void ComputeDefaultActions(std::string type) const;
ParticleUpperBound* CreateParticleUpperBound(std::string name = "DEFAULT") const; ScenarioUpperBound* CreateScenarioUpperBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
ScenarioLowerBound* CreateScenarioLowerBound(std::string name = "DEFAULT",
std::string particle_bound_name = "DEFAULT") const;
}
and in the `starmaze.cpp` file the relevant lines are
int StarMazeProblem::NumStates() const {
return CONTEXT * POSITIONS * TIME;
}
void StarMazeProblem::ComputeDefaultActions(string type) const {
cerr << "Default action = " << type << endl;
if (type == "MDP") {
const_cast<StarMazeProblem*>(this)->ComputeOptimalPolicyUsingVI();
int num_states = NumStates();
default_action_.resize(num_states);
double value = 0;
for (int s = 0; s < num_states; s++) {
default_action_[s] = policy_[s].action;
value += policy_[s].value;
}
} else {
cerr << "Unsupported default action type " << type << endl;
exit(0);
}
}
ScenarioLowerBound* StarMazeProblem::CreateScenarioLowerBound(string name,
string particle_bound_name="DEFAULT") const {
const DSPOMDP* model = this;
const StateIndexer* indexer = this;
const StatePolicy* policy = this;
ScenarioLowerBound* bound = NULL;
if (name == "TRIVIAL" ) {
bound = new TrivialParticleLowerBound(this);
} else if (name == "RANDOM") {
bound = new RandomPolicy(this,
CreateParticleLowerBound(particle_bound_name));
} else if (name == "MODE" || name == "DEFAULT") {
ComputeDefaultActions("MDP");
bound = new ModeStatePolicy(model, *indexer, *policy,
CreateParticleLowerBound(particle_bound_name));
} else {
cerr << "Unsupported scenario lower bound: " << name << endl;
exit(1);
}
return bound;
}
here I got the following error for the above code:
src/starmaze.cpp:301:36: error: passing 'const std::vector<int>' as 'this' argument discards qualifiers [-fpermissive]
default_action_.resize(num_states);
^
In file included from /opt/local/include/gcc7/c++/vector:64:0,
from ../../../include/despot/interface/lower_bound.h:4,
from ../../../include/despot/core/builtin_lower_bounds.h:4,
from src/starmaze.h:3,
from src/starmaze.cpp:1:
/opt/local/include/gcc7/c++/bits/stl_vector.h:689:7: note: in call to 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
resize(size_type __new_size)
^~~~~~
I have basic c++ knowledge and I could not figure out the reason for the error since I followed the examples. Any suggestion?
|
|
|
|
|
Image Transformation
Digital images are represented as a matrix and each element in the matrix represents the RGB value of a pixel. Given the pixel values of a nXn image. Write a code to transform the image into another image by alternate swap of edge pixels. That is for example, given a 4 X 4 image as follows:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
The edge elements of the above image are 1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9 and 5. The following steps are involved in the transformation:
1 and 3 are swapped
1 and 8 are swapped
1 and 16 are swapped
1 and 14 are swapped
1 and 9 are swapped
After doing alternate swap of edge elements the pixel values of the image looks as follows:
3 2 8 4
5 6 7 16
1 10 11 12
13 9 15 14
And given an image of dimension 5 X 5 as follows:
2 4 5 6 3
3 11 12 7 9
7 15 13 8 1
2 21 25 13 14
17 10 16 19 3
Should transform as:
5 4 3 6 1
3 11 12 7 9
2 15 13 8 3
2 21 25 13 14
7 10 17 19 16
Input Format
First line contains the dimension of the matrix, n
Next nxn lines contain the elements of the matrix in row major order. That is the elements in the first row are given followed by second row and so on
Output Format
Print the transformed nxn matrix in ‘n’ lines
Each line contains the elements of a row separated by a tab.
Note: There is a tab at the end of each line
|
|
|
|
|
|
I have two sets of classes, C++/CLI classes and native classes.
They are supposed to be counterparts of each other, used for passing messages & data between a managed module and a native module, with a mixed-mode module in between.
The CLI classes are set up thus: (You may have to meditate on this for a moment to see what I'm trying to do.)
public ref class Managed_base abstract
{
unsigned int _Data = 0;
virtual Native_base* GetNativeObject(unsigned int data) = 0;
}
public ref class Managed_derived : Managed_base
{
virtual Native_derived* GetNativeObject(unsigned int data) override
{
Native_derived* NativeObject = new Native_derived();
NativeObject->_Data = data;
return NativeObject;
}
} I'm trying to set it up so that if I call GetNativeObject on any managed derived class, it will return the corresponding derived native class.
That way I don't have to do any ugly casting when I call GetNativeObject.
But the compile error I get is, "Virtual function overriding with a covariant return type is not allowed in a managed class."
So my question is, is there any way to accomplish what I'm trying to do without having to cast the return type of the GetNativeObject method to the appropriate derived type?
Is there any pattern that does this?
EDIT:
I eventually decided to do away with the pure virtual method and the overriding methods in derived classes. I simply put a regular function into each derived class that returns the appropriate derived native class. It is not beautiful, but it works.
However, I would like to leave this question active, in case someone has any interesting ideas.
The difficult we do right away...
...the impossible takes slightly longer.
modified 12-Sep-20 16:49pm.
|
|
|
|
|
You can help me gird line opengl cli I got it
|
|
|
|
|
Don't post the same non-question to multiple forums.
|
|
|
|
|