clean-it icon indicating copy to clipboard operation
clean-it copied to clipboard

Module code doesn't compile in VS2022 Preview

Open Bluesman74 opened this issue 2 years ago • 0 comments

When I try and compile it I get number of errors:

3>------ Build started: Project: clean-it, Configuration: Debug x64 ------
3>Scanning sources for module dependencies...
3>VODModule.ixx
3>Compiling...
3>VODModule.ixx
3>VODExport.cpp
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\VODExport.cpp(6,11): fatal  error C1117: unrecoverable error importing module 'VOD': symbol 'IStreamer' has already been defined
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\VODExport.cpp(6,11): fatal  error C1117: module VOD;
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\VODExport.cpp(6,11): fatal  error C1117:           \^
3>MovieReader.cpp
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\MovieReader.cpp(9,11): fatal  error C1117: unrecoverable error importing module 'VOD': symbol 'IStreamer' has already been defined
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\MovieReader.cpp(9,11): fatal  error C1117: module VOD;
3>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it\MovieReader.cpp(9,11): fatal  error C1117:           \^
3>VODServer.cpp
3>Generating Code...
3>Done building project "clean-it.vcxproj" -- FAILED.
  
4>------ Build started: Project: clean-it-tests, Configuration: Debug x64 ------
4>IOC.cpp
4>Streamer.cpp
4>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.32919\include\stop\_token(176,1): error C2028: struct/union member must be inside a struct/union
4>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.32919\include\stop\_token(176,1): error C2028: };
4>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.32919\include\stop\_token(176,1): error C2028: \^
4>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it-tests\Streamer.cpp(21,1): fatal  error C1907: unable to recover from previous error(s); stopping compilation
4>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it-tests\Streamer.cpp(21,1): fatal  error C1907: INTERNAL COMPILER ERROR in 'C:\\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.32919\bin\HostX64\x64\CL.exe'
4>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it-tests\Streamer.cpp(21,1): fatal  error C1907:     Please choose the Technical Support command on the Visual C++
4>C:\Dev\test\export\eg2\RefactorWithIOC\clean-it-tests\Streamer.cpp(21,1): fatal  error C1907:     Help menu, or open the Technical Support help file for more information
4>Done building project "clean-it-tests.vcxproj" -- FAILED.
========== Build: 2 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Are there changes to the final C++20 standard, that makes this no longer conforming? Someone has suggested to me that import is not allowed in the global module fragment. VODExport.cpp includes VODExport.h that imports

I wasn't able to fix it/make it work with that info.

I reported this to MS, and they didn't encounter the stop_token compiler error, but did get error C1117

Bluesman74 avatar Sep 21 '23 13:09 Bluesman74