View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032986 | Open CASCADE | OCCT:Samples | public | 2022-05-19 19:58 | 2023-03-19 20:18 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2022 | ||
Product Version | 7.7.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.7.0 | ||
Summary | 0032986: Samples - csharp sample is crashed on compilation with VC++ 2022 | ||||
Description | While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured:Rebuild started... 1>------ Rebuild All started: Project: OCCTProxy, Configuration: Release x64 ------ 1>OCCTProxy.cpp 1>c1xx : warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17 1>c1xx : error C7681: two-phase name lookup is not supported for C++/CLI or C++/CX; use /Zc:twoPhase- 1>c1xx : fatal error C1903: unable to recover from previous error(s); stopping compilation 1>Done building project "OCCTProxy.vcxproj" -- FAILED. ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ========== Officially, C++/CLI mode does not support C++ version newer than C++17, so we should not demand C++20 to compile csharp samples. Alternative solution - using /permissive (ConformanceMode = false), rather than default value /permissive- (ConformanceMode = true) option to compile OCCTProxy. But alternative solution has been denied. So, here is nothing to do to fix compilation of OCCTProxy project. Nevertheless, error occures in IE_WPF_WinForms and IE_WinForms - if we trying to compile with VC++ 2022 (not demanding c++20): Build started... 1>------ Build started: Project: OCCTProxy, Configuration: Release x64 ------ 1>OCCTProxy.cpp 1>.NETFramework,Version=v4.7.2.AssemblyAttributes.cpp 1> Creating library ..\win64\vc143\bin\OCCTProxy.lib and object ..\win64\vc143\bin\OCCTProxy.exp 1>OCCTProxy.vcxproj -> d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\win64\vc143\bin\OCCTProxy.dll 2>------ Build started: Project: IE_WPF_WinForms, Configuration: Release x64 ------ 2>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2302,5): warning MSB3274: The primary reference "d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\win64\vc143\bin\OCCTProxy.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". 2>d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\WPF_WinForms\OCCViewer.cs(60,16,60,25): error CS0246: The type or namespace name 'OCCTProxy' could not be found (are you missing a using directive or an assembly reference?) 2>d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\WPF_WinForms\TransparencyDialog.cs(99,12,99,21): error CS0246: The type or namespace name 'OCCTProxy' could not be found (are you missing a using directive or an assembly reference?) 2>d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\WPF_WinForms\TransparencyDialog.cs(19,13,19,22): error CS0246: The type or namespace name 'OCCTProxy' could not be found (are you missing a using directive or an assembly reference?) 2>d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\WPF_WinForms\MaterialDlg.xaml.cs(46,16,46,25): error CS0246: The type or namespace name 'OCCTProxy' could not be found (are you missing a using directive or an assembly reference?) 2>d:\Users\ddzama\activities\OCCTproducts\occt\install-vc143\samples\CSharp\WPF_WinForms\MaterialDlg.xaml.cs(32,23,32,32): error CS0246: The type or namespace name 'OCCTProxy' could not be found (are you missing a using directive or an assembly reference?) ========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8. So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015. | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
parent of | 0032921 | closed | Configuration, CMake - allow selecting C++ standard |
|
Branch CR32986 has been created by ddzama. SHA-1: 65d725fa1ed88dc152d3d32c468b144271b3cca5 Detailed log of new commits: Author: ddzama Date: Fri Aug 19 14:41:49 2022 +0300 0032986: Fix error of compilation WPF_D3D, WPF_WinForms and WinForms with MSVC 2022. Author: ddzama Date: Fri Aug 19 14:40:19 2022 +0300 0032986: Fix error of compilation CSharp samples/OCCTProxy project with MSVC 2022. |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 6bb4f4c918966c16f079b1a4401da4bdc2e28f8b |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 844facf74b8cacbb87ffc2827939ec29fad22131 |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: ee48f5d8e7c30a29f349e69c55e7820e9fc31ac1 |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 8b536fff481a0afebc0d55aa28f3af88e550a2bb |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: e8fc445cabccb7e427b73357bb25e947c9c2ba6b |
|
Please try to make fix without turning on conformance mode in the build settings. |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 05ce23cb08d99a21085bd892078111946314ff42 |
|
So, the warning message from c1xx says: c1xx : warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17 I think this is the root of the problem. If we pushing on employing c++20, we have to employ /permissive (ConformanceMode = false), rather then defined by default (/permissive-). So, i think we should give up manual attempts to compile this project with c++20 language standard until official support of it by Microsoft Visual Studio. Therefore, i will admit with you, and this arguable commit should be removed. |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 27c02bf6b69d7672ea1de22568f1a0c1bf4d0b64 |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 699a56c16bc881c35e545514a2ae51aabf88d98e |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: d3a7c7690729ca88bd209ea5eb25f4f8264cedd4 |
|
Please make the commit title corresponding to the bug title. Is there any problems with csharp samples in occt-products as well? |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 3d446e0287f3291d97dcdb1502df976395c53233 |
|
Git commit message has been updatet according to this issue title/description. |
|
|
|
But as i can see, it is pure c++ project, not c++/cli. |
|
|
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 399b30e474b98ea57217cc89251cd5b5568712be |
|
Branch CR32986 has been updated forcibly by ddzama. SHA-1: 30247b55ee3a524d439b9847b0e331f7cc90108c |
|
|
|
For integration: occt - CR32986 products - none |
|
Combination - OCCT branch : IR-2022-09-09 master SHA - 526c506cb0a6a5c9c168ab5efd0a4e5211e30bf4 e0ceb716c70188b98130b1550914140d0502a6f9 Products branch : IR-2022-09-09 SHA - changes and them, and you can discard any commits you make in this 574253b6b844635a69038511e6920877f837e298 was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 18959.200000000466 / 18756.090000000648 [+1.08%] Products Total CPU difference: 12020.780000000137 / 11992.830000000133 [+0.23%] Windows-64-VC14: OCCT Total CPU difference: 20894.5625 / 20851.65625 [+0.21%] Products Total CPU difference: 13470.484375 / 13574.0625 [-0.76%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32986 has been deleted by mnt. SHA-1: 30247b55ee3a524d439b9847b0e331f7cc90108c |
occt: master d7eefb11 2022-08-19 14:41:49
Committer: |
0032986: Samples - csharp sample is crashed on compilation with VC++ 2022 While demanding c++ language standard c++20, the error of OCCTProxy compilation is occured: warning C4857: C++/CLI mode does not support C++ versions newer than C++17; setting language to /std:c++17 error C7681: two-phase name lookup is not supported for C++/CLI or C++/CX; use /Zc:twoPhase- Officially, C++/CLI mode does not support C++ version newer than C++17, so we should not demand C++20 to compile csharp samples. Alternative solution - using /permissive (ConformanceMode = false), rather than default value /permissive- (ConformanceMode = true) option to compile OCCTProxy. But alternative solution has been denied. So, here is nothing to do to fix compilation of OCCTProxy project. Nevertheless, error occures in IE_WPF_WinForms and IE_WinForms - if we trying to compile with VC++ 2022 (not demanding c++20): warning MSB3274: The primary reference "*\OCCTProxy.dll" could not be resolved because it was built against the ".NETFramework,Version=v4.7.2" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". To solve the problem it is proposed to demand by default the highest version of NETFramework - 4.8. So, demanding NETFramework v4.8 does not crashing compilation of csharp samples with VC++ 2015. |
Affected Issues 0032986 |
|
mod - samples/CSharp/WinForms/app.config | Diff File | ||
mod - samples/CSharp/WinForms/IE_WinForms.csproj | Diff File | ||
mod - samples/CSharp/WPF_D3D/app.config | Diff File | ||
mod - samples/CSharp/WPF_D3D/IE_WPF_D3D.csproj | Diff File | ||
mod - samples/CSharp/WPF_WinForms/app.config | Diff File | ||
mod - samples/CSharp/WPF_WinForms/IE_WPF_WinForms.csproj | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-05-19 19:58 |
|
New Issue | |
2022-05-19 19:58 |
|
Assigned To | => ddzama |
2022-05-19 20:44 | kgv | Product Version | => 7.7.0 |
2022-05-19 20:44 | kgv | Target Version | 7.6.3 => 7.7.0 |
2022-05-19 20:44 | kgv | Summary | Samples: csharp sample is crashed on compilation with C++20 => Samples - csharp sample is crashed on compilation with C++20 |
2022-05-19 20:45 | kgv | Relationship added | child of 0032887 |
2022-05-19 20:45 | kgv | Description Updated | |
2022-08-19 14:44 | git | Note Added: 0110325 | |
2022-08-19 15:26 | git | Note Added: 0110326 | |
2022-08-22 10:32 | git | Note Added: 0110335 | |
2022-08-29 12:51 | git | Note Added: 0110400 | |
2022-08-29 13:44 | git | Note Added: 0110408 | |
2022-08-31 10:30 |
|
Relationship added | child of 0032921 |
2022-08-31 10:30 |
|
Relationship deleted | child of 0032887 |
2022-08-31 10:31 |
|
Assigned To | ddzama => msv |
2022-08-31 10:31 |
|
Status | new => resolved |
2022-08-31 10:31 |
|
Steps to Reproduce Updated | |
2022-08-31 10:43 |
|
Relationship deleted | child of 0032921 |
2022-08-31 10:44 |
|
Relationship added | parent of 0032921 |
2022-08-31 11:04 | git | Note Added: 0110465 | |
2022-08-31 11:28 |
|
Note Added: 0110471 | |
2022-08-31 11:28 |
|
Assigned To | msv => ddzama |
2022-08-31 11:28 |
|
Status | resolved => assigned |
2022-08-31 17:13 | git | Note Added: 0110503 | |
2022-09-02 12:28 |
|
Note Added: 0110563 | |
2022-09-02 12:31 |
|
Note Edited: 0110563 | |
2022-09-02 12:38 | git | Note Added: 0110564 | |
2022-09-02 17:38 |
|
Assigned To | ddzama => msv |
2022-09-02 17:38 |
|
Status | assigned => resolved |
2022-09-03 00:32 | git | Note Added: 0110584 | |
2022-09-05 09:44 | git | Note Added: 0110609 | |
2022-09-05 16:10 |
|
Note Added: 0110666 | |
2022-09-05 16:10 |
|
Assigned To | msv => ddzama |
2022-09-05 16:10 |
|
Status | resolved => assigned |
2022-09-06 01:04 |
|
Summary | Samples - csharp sample is crashed on compilation with C++20 => Samples - csharp sample is crashed on compilation with VC++ 2022 |
2022-09-06 01:04 |
|
Description Updated | |
2022-09-06 01:06 |
|
Description Updated | |
2022-09-06 01:12 |
|
Description Updated | |
2022-09-06 01:14 |
|
Description Updated | |
2022-09-06 01:14 |
|
Description Updated | |
2022-09-06 01:20 |
|
Description Updated | |
2022-09-06 01:20 | git | Note Added: 0110691 | |
2022-09-06 01:22 |
|
Note Added: 0110692 | |
2022-09-06 01:25 |
|
Note Added: 0110693 | |
2022-09-06 11:09 |
|
Note Added: 0110706 | |
2022-09-06 11:26 |
|
Note Added: 0110710 | |
2022-09-06 12:13 | git | Note Added: 0110718 | |
2022-09-06 12:15 | git | Note Added: 0110719 | |
2022-09-06 12:18 |
|
Note Added: 0110720 | |
2022-09-06 13:46 |
|
Assigned To | ddzama => msv |
2022-09-06 13:46 |
|
Status | assigned => resolved |
2022-09-06 13:46 |
|
Assigned To | msv => bugmaster |
2022-09-06 13:46 |
|
Status | resolved => reviewed |
2022-09-06 13:46 |
|
Note Added: 0110731 | |
2022-09-11 13:56 |
|
Status | reviewed => tested |
2022-09-11 13:56 |
|
Note Added: 0110919 | |
2022-09-11 14:03 |
|
Test case number | => Not required |
2022-09-11 14:40 |
|
Changeset attached | => occt master d7eefb11 |
2022-09-11 14:40 |
|
Assigned To | bugmaster => ddzama |
2022-09-11 14:40 |
|
Status | tested => verified |
2022-09-11 14:40 |
|
Resolution | open => fixed |
2022-09-11 14:51 | git | Note Added: 0110945 | |
2023-03-19 20:18 | vglukhik | Status | verified => closed |
2023-03-19 20:18 | vglukhik | Fixed in Version | => 7.7.0 |