Mainsolution
dll Project < /li>
Запуск Project < /li>
< /ul>
< /li>
< /ul>
Код: Выделить всё
Startup Project
Код: Выделить всё
export module MyModule;
import ;
import ;
import ;
export template
void __declspec(dllexport) MyLog(const char* format, Args... args) {
auto str = std::vformat(format, std::make_format_args(args...));
std::cout
Команда ссылки < /p>
[code]link.exe /ERRORREPORT:PROMPT /OUT:"D:\code\cpp\FormatErrorTest\x64\Debug\FormatErrorTest.exe" /INCREMENTAL /ILK:"x64\Debug\FormatErrorTest.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:\code\cpp\FormatErrorTest\x64\Debug\FormatErrorTest.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\code\cpp\FormatErrorTest\x64\Debug\FormatErrorTest.lib" /MACHINE:X64 x64\Debug\Main.obj
Код: Выделить всё
export module MyModule;
import ;
import ;
import ;
export template
void MyLog(const char* format, Args... args) {
auto str = std::vformat(format, std::make_format_args(args...));
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79648296/lnk2001-when-using-msvc-c20-vformat-c20-module-and-dll[/url]