Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 C 应用程序调用可执行文件。这是我的代码:
execl("/home/ion/workspace/DNS/Debug","DNS","216.58.198.164","A",(char*)NULL);
其中 IP 和“A”应该是 argv[1] 和 argv[2]
这个名为 DNS 的应用程序应该写一个文件,但是当我像这样用 execl 调用它时它不起作用。任何人都可以帮助我吗?
您的应用程序名称 (DNS) 应在第一个参数(路径)中指定
execl("/home/ion/workspace/DNS/Debug/DNS","DNS","216.58.198.164","A",(char*)NULL);