CSCI222 Project Readme / Install
- http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
- https://www.gnu.org/software/cgicc/doc/index.html
- https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-getting-started-examples.html
-
Prefrences -> locations -> advanced -> custom -> absolute
-
In Build Settings:
a) Pre configuration build products path: CONFIGURATION_BUILD_DIR = /Users/james/Repos/StackOverflow/www
b) Product Name PRODUCT_NAME = $(TARGET_NAME)
Download from: https://www.gnu.org/software/cgicc/index.html v 3.2.16
- Follow below $ cd /Users/james/Desktop/cgicc-3.2.16 $ sudo ./configure --prefix=/usr/local/Cellar/cgicc $ sudo make $ sudo make install
-> need to make shortcuts etc in /usr/local/include/ and /usr/local/lib/
ln -s ~/Foo\ Bar/ Foo
-
In Build Settings:
a) Header Search Paths HEADER_SEARCH_PATHS = /usr/local/include/**
b) Library Search Paths LIBRARY_SEARCH_PATHS = /usr/local/lib/**
c) Add the .a / dylib file in /usr/local/lib/cgicc/lib/ to the Build Phases
-
Set up paths as above
OR
Use Brew:
brew install mysql-connector-c++ brew install boost
$ sudo a2enmod cgi $ nano /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80> ServerName www.csci222.com
ServerAdmin [email protected]
DocumentRoot /var/www/csci222.com/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/csci222.com/www">
Options ExecCGI
AddHandler cgi-script .html
AllowOverride All
Require all granted
Allow from all
</Directory>
$ apt-get install libcgicc5-dev $ apt-get install libmysqlcppconn-dev
- download latest tar.gz from site above
- open win/cgicc.dsp
- build with release configurations 3.5 copy *.lib to /usr/lib/ and all headers *.h too /usr/include/
- project project properties -> vc++ dirs -> include -> add include / add lib
- in settings too go linker/input/additional dep/ add cgicc.lib (no dir)
- copy .dll into /usr/bin
- config properties -> debugging -> environment ADD ->PATH=\usr\bin
DocumentRoot "C:/Users/James/Repos/BitQA/www" <Directory "C:/Users/James/Repos/BitQA/www"> Options ExecCGI AddHandler cgi-script .html AllowOverride All Require all granted Allow from all
ServerName csci222.local:80
C:\Windows\System32\drivers\etc\hosts 127.0.0.1 csci222.local
to change output dir and targets config -> general -> output dir && target name
http://dev.mysql.com/downloads/connector/cpp/ copy lib and .h into /usr, will install in program files
https://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.zip/download http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html copy into /usr/
- recursive headers and libs in xcode http://stackoverflow.com/questions/12573271/xcode-with-boost-semantic-issue-undeclared-identifier-va-start
- Custom Build Directories: Make sure you output your build to correct path and name: