从linux命令行调用IDL预处理器 [英] Invoking the IDL pre-processor from linux command line
问题描述
我正在使用linux 4.20和ubuntu 15.10虚拟机,我的主机是Windows 7.我正在尝试使用Prismtech(社区版)提供的数据分发服务(DDS)协议来实现一个简单的聊天消息示例。 />
我遇到了一个教程,我必须调用Chat.idl。下面是文件中的代码,其中包含服务器和客户端之间互连的主体。
I am working on a linux 4.20 and ubuntu 15.10 virtual machine and my host is windows 7. I am trying to implement a simple chat message example using Data Distribution Service (DDS) protocol provided by Prismtech (Community Edition).
I came across a tutorial where I have to invoke the Chat.idl. Below there is the code in the file, which contains body for interconnection between a server and a client.
module Chat {
const long MAX_NAME = 32;
typedef string<max_name> nameType;
struct ChatMessage {
long userID; // owner of message
long index; // message number
string content; // message body
};
#pragma keylist ChatMessage userID
struct NameService {
long userID; // unique user identification
nameType name; // name of the user
};
#pragma keylist NameService userID
struct NamedMessage {
long userID; //unique user identification
nameType userName //user name
long index; //message number
string content; //message body
};
#pragma keylist NamedMessage userID
};
调用这个我应该在我的命令行(终端)中输入idlpp -S -lc Chat.idl。下面是终端显示IDL解析器错误:打开文件chat.idl的输出。
to invoke this i am supposed to type in "idlpp -S -l c Chat.idl" in my command-line (terminal). Below is my output from the terminal showing "IDL parser error: opening file chat.idl".
-virtual-machine:~/HDE/x86.linux$ idlpp
Usage: idlpp [-c preprocessor-path] [-b ORB-template-path]
[-n <include-suffix>] [-I path] [-D macro[=definition]] [-S | -C]
[-l (c | c++ | cpp | isocpp | isoc++ | cs | java)] [-j [old]:<new>] [-d directory] [-i]
[-P dll_macro_name[,<h-file>]] [-o (dds-types | custom-psm | no-equality)] <filename>
akhil@akhil-virtual-machine:~/HDE/x86.linux$ idlpp -S -l c chat.dil
IDL parser error: opening file chat.dil
我尝试过:
What I have tried:
-virtual-machine:~/HDE/x86.linux$ idlpp
Usage: idlpp [-c preprocessor-path] [-b ORB-template-path]
[-n <include-suffix>] [-I path] [-D macro[=definition]] [-S | -C]
[-l (c | c++ | cpp | isocpp | isoc++ | cs | java)] [-j [old]:<new>] [-d directory] [-i]
[-P dll_macro_name[,<h-file>]] [-o (dds-types | custom-psm | no-equality)] <filename>
akhil@akhil-virtual-machine:~/HDE/x86.linux$ idlpp -S -l c chat.dil
IDL parser error: opening file chat.dil</filename></h-file></new></include-suffix></filename></h-file></new></include-suffix></max_name>
推荐答案
idlpp
用法:idlpp [-c preprocessor-path] [-b ORB-template-path]
[ -n< include-suffix>] [-I path] [-D macro [= definition]] [-S | -C]
[-l(c | c ++ | cpp | isocpp | isoc ++ | cs | java)] [-j [old]:< new>] [-d directory] [-i]
[-P dll_macro_name [,< h-file>]] [-o(dds-types | custom-psm | no-equality)]< filename>
akhil @ akhil-virtual-machine:〜/ HDE / x86.linux
idlpp Usage: idlpp [-c preprocessor-path] [-b ORB-template-path] [-n <include-suffix>] [-I path] [-D macro[=definition]] [-S | -C] [-l (c | c++ | cpp | isocpp | isoc++ | cs | java)] [-j [old]:<new>] [-d directory] [-i] [-P dll_macro_name[,<h-file>]] [-o (dds-types | custom-psm | no-equality)] <filename> akhil@akhil-virtual-machine:~/HDE/x86.linux
idlpp -S -lc chat.dil
IDL解析器错误:打开文件chat.dil
idlpp -S -l c chat.dil IDL parser error: opening file chat.dil
我尝试过:
What I have tried:
-virtual-machine:~/HDE/x86.linux
idlpp
用法:idlpp [ -c preprocessor-path] [-b ORB-template-path]
[-n< include-suffix>] [-I path] [-D macro [= definition]] [-S | -C]
[-l(c | c ++ | cpp | isocpp | isoc ++ | cs | java)] [-j [old]:< new>] [-d directory] [-i]
[-P dll_macro_name [,< h-file>]] [-o(dds-types | custom-psm | no-equality)]< filename>
akhil @ akhil-virtual-machine:〜/ HDE / x86.linux
idlpp Usage: idlpp [-c preprocessor-path] [-b ORB-template-path] [-n <include-suffix>] [-I path] [-D macro[=definition]] [-S | -C] [-l (c | c++ | cpp | isocpp | isoc++ | cs | java)] [-j [old]:<new>] [-d directory] [-i] [-P dll_macro_name[,<h-file>]] [-o (dds-types | custom-psm | no-equality)] <filename> akhil@akhil-virtual-machine:~/HDE/x86.linux
这篇关于从linux命令行调用IDL预处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!