Compiling, Linking and Building C/C++ Applications tutorial
Documentation for gcc command options can be found here
Sometime, when compiling in linux, you might encounter the error: ld cannot find an existing library which might be caused by the fact that the library you are linking against, end with .so.1 instead of just .so. If this happens
Notes from Simon Fraser University, departement of Statistics can be found here
Notes from Hadley Wickham on github, which can be found here
To use Makevars with R CMD SHLIB either
gcc equivalent commands to R CMD SHLIB can be found in the answer to the following question found on stackoverflow
To add enviroment variable in a unix-like system, u can either add them to the .bash_profile or to the .profile files in your home directory see unix.stackexchange
It's not a good idea to mix compilers (i.e. use gcc with a library built in Microsoft VisualC++ (MSVC)).stackoverflow Here is some links that might help
But if you insist, then good luck. below are some links
Source Code for SHLIB command (for sun arch which is developed by Sun and whose operating system includes SunOS, Solaris or OpenSolaris, NeXTSTEP, RTEMS, FreeBSD, OpenBSD, NetBSD, and GNU/Linux) can be found here
Packaging a C library in 15 minutes R-bloggers
For the difference between: Makefile, Makevars and configure, see Prof. Brian D. Ripley explanation on R-dev mailing list
Make and Makefiles tutorial can be found @ http://mrbook.org/tutorials/make/
see apple developer link for basic introductory information
use launchd to manage daemons apple support link
To configure daemon, one creates a .plist wich is essentially an xml file. See blog link for the .plist file used to manage RStudio Server on a Mac, and it's usually placed in /Library/LaunchDaemons.
launchd.plist command to manage daemons on mac apple developer link
launchctl Tutorial blog link
Lingon is a GUI utility to view & edit agents & daemons for OS X - see. blog link
Ubuntu keyboard shortcuts can be found @ https://help.ubuntu.com/community/KeyboardShortcuts
to find out the ip of the machine, use ifconfig command
how to create symbolic link using ls command. seeaskubuntu.com
Despite initial success with R CMD SHLIB after setting up enviroment variable, as discussed above, when i used the command dyn.load in R, i would get an error that the library file could not be found. This is the same library file that i had linked against, using the enviroment variable. To diagnose this problem, i went back to the .so file which was created usin R CMD SHLIB, and type: ldd NameOfLibrary.so to see its dependencies. See the links below for info.
Another possible solution (although untested), is to LD_LIBRARY_PATH environment variable, as described in http://www.bioconductor.org/help/faq/ where they discuss the situation where an R package can install properly but fail to load.
To set enviroment variable from within R and to be used only for R, use the following commands: Sys.getenv and Sys.setenv
Library file (.so) are usually installed in /usr/local/lib/ as discussed in askubuntu and ubuntuforums