Questions tagged «mainframe»

9
如何在z / OS上的C ++中使用C套接字API
我有越来越的C套接字API到正常工作的问题C++上z/OS。 尽管我包括在内sys/socket.h,但仍然收到编译时错误,告诉我这AF_INET是未定义的。 我是否遗漏了一些明显的东西,或者这与事实z/OS使我的问题变得更加复杂有关? 更新:经过进一步调查,我发现有一个#ifdef我在打。z/OS除非我定义要使用的套接字的“类型”,否则显然是不高兴的: #define _OE_SOCKETS 现在,我个人不知道这_OE_SOCKETS实际上是做什么的,因此,如果有任何z/OS套接字程序员(你们所有人中的三个)都在这里,也许您可​​以给我一个总结一下这一切的工作原理? 测试应用 #include <sys/socket.h> int main() { return AF_INET; } 编译/链接输出: cxx -Wc,xplink -Wl,xplink -o inet_test inet.C "./inet.C", line 5.16: CCN5274 (S) The name lookup for "AF_INET" did not find a declaration. CCN0797(I) Compilation failed for file ./inet.C. Object file not created. 检查sys / …
158 c++  c  sockets  mainframe  zos 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.