我是新的C++,我已經安裝了lib Com++網絡編程 但是當我只是包含頭文件關於沒有這樣的文件或目錄編譯終止錯誤
#include <iostream>
#include <ComPP/ComPlusPlus>
using namespace std;
int main(int argc ,char *argv[]){
cout << "Hello World" << endl;
return 0;
}
我得到的錯誤
main.cpp:2:29: fatal error: ComPP/ComPlusPlus: No such file or directory
使用Fedora Linux系統 我用這個命令作爲在手動
g++ -I ./ -L./ -o server main.cpp -lCommPP -lsys -lpthread -lrt
提到編譯
目錄/ usr/include中/ ComPP /是所有頭文件
ComPP
├── ComPlusPlus
│ ├── AClnt.h
│ ├── ASrvContext.h
│ ├── ASrv.h
│ ├── ASrvProperties.h
│ ├── Clone.h
│ ├── Comm.h
│ ├── ComPlusPlus
│ ├── Context.h
│ ├── Daemon.h
│ ├── Directory.h
│ ├── DirEntry.h
│ ├── File.h
│ ├── Launch.h
│ ├── Mutex.h
│ ├── Poll.h
│ ├── Process.h
│ ├── SClnt.h
│ ├── Sem.h
│ ├── ShMem.h
│ ├── Signalling.h
│ ├── Socket.h
│ ├── SocketTcp.h
│ ├── SocketUdp.h
│ ├── SocketUnix.h
│ ├── SrvProperties.h
│ ├── SSrvContext.h
│ ├── SSrv.h
│ ├── SSrvProperties.h
│ └── Thread.h
└── SysPlusPlus
├── ComException.h
├── config.h
├── GenCfg.h
├── Logger.h
├── syscall.h
├── syslib.h
├── SysPlusPlus
└── Tools.h
你沒有指定其中頭文件,你想包括。 – iceaway