網頁

2014年7月21日 星期一

Linux gcc g++

Last Update: 2014/06/28 18:36+08
Type: Note


---Ubuntu---------

lastest
sudo apt-get install g++

special version
sudo apt-get install g++-4.7


switch
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7

remove update-alternatives
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++



---CentOS---------

su root

yum install gcc-g++
若compile出現 cannot find -lm (或 -lxxx)
yum install glibc-static



Eclipse & PHP

Last Update: 2014/07/24 15:32+08



PDT install


Help > Install New Software
   > Work with: Kepler(your eclipse version) http://download.eclipse.org/xxxxxxxxx
   > Programming Language
     >勾選PHP Development Tool (PDT)
Next Next Next ...

P.S: Linux 可能要先download core: https://eclipse.org/pdt/#download



.buildpath

在新增PHP project時, 可以設定 src目錄
若發現沒有 auto complete 時
可以在 Project Build Path 重新設定 src目錄
另外也可以在專案目錄裡找到 .buildpath 的檔案, 去修改
<buildpath>
 <buildpathentry kind="src" path="war"/>
 <buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
</buildpath>
auto complete 會用到的2個設定
src: 你自己寫的php code
con: PHP 的 Core API



Apache 虛擬目錄設定

Last Update: 2014/07/21 21:59+08
Type: Note



Alias /test "D:\Dev\test\eclipsews\test\war"
<Directory "D:\Dev\test\eclipsews\test\war">
 Options Indexes FollowSymLinks
 AllowOverride All
 Order allow,deny
 Allow from all
 DirectoryIndex index.html index.php
 Require all granted
</Directory>

Require all granted:
  xampp要加, 還不確定什麼時候狀況需要