我正在使用 CreateProcess 调用 cl
将另一个 C++ 程序 ( TestProg.cxx
) 编译并链接到 DLL 中。cl
我使用以下编译选项调用:
/Od /nologo /Fo /RTC /w /Zc /EHsc /I\INCLUDE /I\LIB /I\PATH TestProg.cxx /DLL
电话:
if ( CreateProcess(full path to cl.exe, compilation options, NULL,NULL,FALSE,0, NULL,NULL,&si,&pi) )
{
//....
}
从 VS 工具提示符运行应用程序,我收到以下链接错误:
LINK : fatal error LNK1561: entry point must be defined
我究竟做错了什么?我在网上搜索了最后 1/2 天的答案,但没有找到。使用 Windows API 对我来说是新的。
谢谢