0
我嘗試開發本地進程間通信匿名管道,指這篇文章...... http://msdn.microsoft.com/en-us/library/bb546102.aspx本地進程間通信匿名管道上了openFrameworks 0.7.4 VS 2010
我把這兩條線在testApp.cpp
#using <System.dll>
#using <System.Core.dll>
using namespace System;
using namespace System::IO;
using namespace System::IO::Pipes;
using namespace System::Diagnostics;
void testApp::setup() {
}
void testApp:update() {
}
void testApp:draw() {
Process^ pipeClient = gcnew Process();
pipeClient->StartInfo->FileName = "pipeClient.exe";
AnonymousPipeServerStream^ pipeServer =
gcnew AnonymousPipeServerStream(PipeDirection::Out,
HandleInheritability::Inheritable);
// Show that anonymous pipes do not support Message mode.
try
{
Console::WriteLine("[SERVER] Setting ReadMode to \"Message\".");
pipeServer->ReadMode = PipeTransmissionMode::Message;
}
catch (NotSupportedException^ e)
{
Console::WriteLine("[SERVER] Exception:\n {0}", e->Message);
}
Console::WriteLine("[SERVER] Current TransmissionMode: {0}.",
pipeServer->TransmissionMode);
}
,他們表現出,
"Error:"#using" requires C++/CLI to be enabled
在#using <System.dll>
,因此,在項目
Properties->Configuration Properties->General->Common
語言運行庫支持,我從「沒有共同語言Runtime
支持」到「Common Language Runtime Support (/clr)
」改變了這個。
然後我試圖重建並得到了另一個錯誤,是
Command line error D8016: '/ZI' and '/clr' command-line options are incompatible..
現在,我完全失去了..
有誰有如何對0.7.4建立匿名管道的解決方案?
在此先感謝。
OpenFrameworks 0.7.4/Visual Studio 2010/compiler v100
你有沒有考慮使用波科的管道?它們在openFrameworks中可用,並且跨平臺很好地工作http://pocoproject.org/slides/150-Processes.pdf – bakercp