Running the PIDL Compiler
Last updated
Last updated
You can use the PIDL add-on to create and compile PIDL files conveniently, but if it is not available, please set up PIDL Custom Build in the following way.
Here are the details of each of the build settings.
Command line: <Path where PIDL.exe is located>\PIDL.exe "%(FullPath)" -outdir .
Description: Compiling %(Filename).pidl ...
Output: %(RootDir)%(Directory)%(Filename)_common.cpp;%(RootDir)%(Directory)%(Filename)_common.h;%(RootDir)%(Directory)%(Filename)_proxy.cpp;%(RootDir)%(Directory)%(Filename)_proxy.h;%(RootDir)%(Directory)%(Filename)_stub.cpp;%(RootDir)%(Directory)%(Filename)_stub.h;%(Outputs)
Additional dependency: <Path where PIDL.exe is located>\PIDL.exe
PIDL.exe is located in the util folder of ProudNet.
You must set the same settings for both the Debug and Release builds.
Once you are all set up, compile the PIDL file and if it is done successfully, you should see the output like below.
Visual Studio 2005 and 2008 versions support Custom Build Rules, which are automatically set up each time you add a PIDL file without the need for custom build settings. However, Visual Studio 2010 and later versions can use Build customizations.
Example of installing the open source Mono library on Ubuntu ※ The open-source Mono project supports Linux, Windows, and Mac OS.
RMI is also available in the C# language, so the PIDL compiler also generates proxy and stub code for the C# language.
Running as follows generates the proxy and stub code for the C# language. (Existing -clr is the same as -cs.)
It is recommended to use proxy and stub created in C# language as commonly used modules. As with PIDL, this module requires input of a PIDL file from a C# project and custom build.
The proxy,stub generated after building C2S.pidl is as follows.
C2S_common.cs
C2S_proxy.cs
C2S_stub.cs
Include these files in your C# project (.csproj). However, these files are build output and should not be placed in source control (e.g. SVN, etc.), as you may get writing errors on read-only files.
We recommend opening the .csproj file in an editor and modifying it as follows.
The proxy and stub generated in the C# language are the class with the same name as in C++, and the usage is the same.
The access modifiers for the proxy, stub, and common classes that the PIDL compiler generates are internal by default. These classes can be used from different sources within the same module (or assembly), but not from other modules.
However, if you want to build a module that collects these classes separately and use the classes in this module in other modules, you may want to change the access modifier to public.
In this case, set the access modifier properties for the class that the PIDL compiler generates as follows.