|
I fixed my problem already , Updated from array<system::byte^>^
to array<system::byte>^.
|
|
|
|
|
I'm trying to build a really simple class with member variables and member functions for learning.
I am trying to achieve the following code inside btn_User1_Click, however since user1 is not globally declared, it couldn't find the variable. At the same time, if I tried to declare this
myUser^ user1 = gcnew user1 (1002); outside the function , it gives an error syntax error missing ';' before '^'
myUser.h
#pragma once
ref class myUser
{
public:
myUser(unsigned int user_id) :id(user_id) {
...
}
private:
unsigned int id{ 0 };
public:
System::Void increment_UserID() {
id = id + 1;
}
};
MyForm.cpp
namespace FACEDControllerGUI {
System::Void MyForm::MyForm_Load(System::Object^ sender, System::EventArgs^ e) {
myUser^ user1 = gcnew user1 (1002);
myUser^ user2 = gcnew user1 (1005);
}
System::Void MyForm::btn_User1_Click(System::Object^ sender, System::EventArgs^ e) {
user1->increment_UserID();
}
System::Void MyForm::btn_User2_Click(System::Object^ sender, System::EventArgs^ e) {
user2->increment_UserID();
}
}
|
|
|
|
|
You are creating user1 and user2 inside the MyForm_Load method, so as soon as that method ends the two variables disappear. You should create them in the class definition of MyForm so they are available to all methods of the class.
|
|
|
|
|
I have mentioned this following:
At the same time, if I tried to declare this
myUser^ user1 = gcnew user1 (1002); outside the function , it gives an error syntax error missing ';' before '^'
Fortunately, I have solved my problem. It is due to #include function of the class is placed in the .cpp file, instead of the .h file
|
|
|
|
|
1. What is friend function and friend class? Class "stu-info" stores all the details related to students like (name, reg, section , marks of 5 subjects). Class "show_details" will act like a friend of class "stu-info" and perform following operations: basic_details() and result(). These functions will work on the private data members of "stu-info".
|
|
|
|
|
Is that a question or a statement?
|
|
|
|
|
|
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
|
|
|
|