我是Wt和C++的新手,我刚安装了Ubuntu 16.04 LTS的Wt webframework到自定义文件夹我的主目录。我无法在此计算机的/usr
指令中安装或构建任何软件。即使我可以,PPA还没有活动了2年半,而官方的Ubuntu安装instructions也过时了。智能不再随Ubuntu一起发布,并最终会停止。如何将Wt安装到自定义文件夹中没有“致命错误:Wt/WApplication:没有这样的文件或目录”
我compliled并成功安装了一切,但是当我尝试编译Hello World例子,我得到以下错误:
g++ -o hello hello.cpp -lwt -lwthttp
fatal error: Wt/WApplication: No such file or directory
这里是我的安装步骤:
提升:
wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.bz2
tar --bzip2 -xf boost_1_65_1.tar.bz2
cd boost_1_65_1
./bootstrap.sh --prefix=../myfolder
sudo ./b2 install --prefix=../myfolder
CMake:
wget https://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
tar -xvzf cmake-3.9.2.tar.gz
cd cmake-3.9.2
./configure --prefix=../myfolder
make
sudo make install
vim .profile
export PATH=$PATH:/home/ubuntu/myfolder/bin
重量:
git clone https://github.com/emweb/wt.git
cd wt
cmake -DCMAKE_INSTALL_PREFIX:PATH=../myfolder .
-- Generating done
-- Build files have been written to: /home/ubuntu/myfolder
make
sudo make install
make -C examples
由于我在/myfolder
一起结块的一切,我没有用每重量安装instructions的/build
文件夹。 libwt
和libboost
库位于/myfolder/lib
。我认为所有的链接在安装过程中都经过了照顾。
有什么想法?提前致谢。
你需要告诉编译器在哪里找到头(即设置合适的包含路径,因为你没有安装到标准位置)。 –