Using boost library on Mac os and its location - macos

I got a mac for the first time. I am not familiar at all with it.I installed boost on it.I am not sure whether it was successfull or not but when I tried reinstalling it said already installed.which I assume means it was indeed successfully installed.
I used brew to install boost. My problem is that I dont know where it got installed,in which folder,I cannot seem to find the path. I open file explorer.I cant seem to see all the files and folders like in windows.
Then again I would like to use it to write code.In univ we just type in emacs and g++ compiler and it works. Id like to know the setting that I need to make in order to use it this way.
Last but not least,it would be greatif you guys cud tell me how I can link it to Xcode.Id like to use an ide to use Boost.I know that most of the questions
Thank you

Related

How to create distribution of Python GTK3 app?

I made an application using GTK3 on Windows (Mingw_x64 installation of GTK) and I cannot really figure out how to make a distribution out of this. According to official documentation of PyGObject, it is possible in some way.
I already tried to make a package using setuptools, but PyGObject documentation is not saying much about this process and I was not able to configure setup correctly to make it work. PyGObject has a lot of dependecies and weird imports, that I do not know how to include.
I also tried Pyinstaller, which claims it has GTK support, and it really can pack it into executable, however it is not working. I tried these two options:
make only one file (.exe), but in this situations, it throws an error, that some file is not found (libpixbufloader-ani.dll)
create a directory with all needed files (libpixbufloader-ani.dll and other libs are included this time), but when running exe, another exeption occurs, this time Struct and 2 other libraries are missing (strangely, there is a folder that contains Struct)
Becouse of the missing files, I tried adding as many paths containing needed libraries as possible to Pyinstaller, but without success.
Does anyone have any experience with packaging GTK appliciations in Python? There is definitely a way to do this, but I am not very experienced with packaging. If needed, I can provide more information.
This is an issue that has been brought up on PyInstaller's GitHub page, as others (including myself) have experienced the same issue that you've mentioned.
The last time I tried the dev version of PyInstaller, the issue still wasn't fixed, but I managed to get a working executable by using PyInstaller to find the dependencies that my Python3/GTK3 app needed, and then I used cx_Freeze to generate the final executable.

Installing caffe brings up some questions, depending libraries and versions

I wanted to install caffe on openSuse.
Just for the record - it worked out for me, I just don't know what's the "exact" way to do this. The things I did maybe aren't really for someone who's new to this, and also it was kind of a "bad installation". My way was the following:
First, I did
make all
This worked, until it complained that some libraries weren't found (libclbas etc.). So I used
ccmake .
to change the paths to the libraries manually. I needed to manually type the paths to the snappy, boost_python, blas, cblas and lapack libs. After doing that I did
cmake .
and then
make
and everything worked. My problem now is - why doesn't make find the libs, and is there a way to fix this? I think the problem was that I didn't have /usr/lib/libcblas.so but /usr/lib/libcblas.so.3, and similar "problems" with the other libraries.
Another thing - when I tried using ccmake/cmake right from the beginning (without the make part first), there weren't any files in my build directory (like $CAFFE_ROOT/build/examples or $CAFFE_ROOT/build/tools were empty), so the mnist tutorial for example wasn't working. That's why I first called
make all
, what may seem strange to you.
Of course I know how to fix this stuff, but I would like to know how the correct way for a "clean and simple installation" is. Did is miss anything when using make/cmake, is this some kind of inconsistency in caffe or something else? And, what is the clean way to do this?
Maybe look at the Ubuntu installation guide? http://caffe.berkeleyvision.org/install_apt.html
It mentions all the different packages you might need. I couldn't find openSuse installation instructions - but you should be able to translate the apt-get commands for your platform.

How do I install gtk-fortran on windows 8?

I want to build a GUI for some fortran code I have. GTK-Fortran seemed like a simple option, but I'm having trouble getting everything installed in the correct place.
I am using Windows 8. I have gfortran (version 4.8.1), Cmake, and GTK+ 3 installed. As far as I can tell, the last thing I need to do is include GTK-Fortran, which I download from https://github.com/jerryd/gtk-fortran (the link to download the .zip file is on the right side of the page), but all of the instructions on what to do with it are incredibly vague to me. The INSTALL instructions seem to want me to make a new directory, C:\build, and then do something with cmake, but I'm not sure what that something is or how to do it.
I have GTK+ 3 in C:\GTK, and its bin is included in the path. I would like to just put the GTK-Fortran files within the GTK folder, but I don't think that will actually give me access to the GTK-Fortran files.
Could someone give me very clear instructions on what to do with the files for GTK-Fortran so that I can call them from my own fortran code?
The simplest way for using gtk-fortran under Windows is to install MSYS2/MINGW64, following the installation steps described in the wiki of the project:
https://github.com/vmagnin/gtk-fortran/wiki#windows

RQuantlib and Mac OS X 10.8.2

I'm a total newbie in Mac OS X, R and C++. Sound like a good mix, doesn't it?
I have the need to use RQuantLib, because I want to use some pricing functions part of the QuantLib package inside R, all on a Mac OS X-powered environment.
I've correctly installed QuantLib. I've already asked to the official QuantLib mailing list, and together we seem to have reached the conclusion that the problems I'm encountering are not related to my QuantLib installation, which seems ok and correctly configured.
So, I turned to R to try and solve the problem. Whenever I try to run ZeroCouponBond from within R, copying and pasting the first example provided with the official documentation, I get the following error:
"Error in DiscountCurve.default(discountCurve.param, list(flat = 0.05)) :
cannot find function errorOccured"
Now, I would rule any syntax.related problem out, since I'm copying the very same example present in the official help.
I don't know what I did wrong, but I know I need to find a solution at all costs. I've installed Rcpp, and the configuration seems really ok. Just one question I was not able to find an answert to: in my understanding, RQuantLib basically acts as a link between QuantLib and R. If that's correct, how can I tell RQuantLib where to look to find libQuantLib.a, that is, the compiled library resulting from the "make && sudo make install" commands performed while installing QuantLib itself?
Right, so, I've finally managed to get it to work.
First of all, I would like to say that things would have been much easier if a thorough, step-by-step installation procedure had been provided. I acknowledge I'm a total newbie, but I think other people approaching to R for the first time might encounter difficulties similar to those I had to overcome.
Anyway, this is what I did:
I've downloaded the .tar.gz source packages for both Rcpp and RQuantLib from cran.r-project.org
I've compiled them installing them from within the R environment. This is where I was making a mistake. Indeed, I was trying to compile them by invoking the configure installation script from the terminal; however, as Dirk said, the config script looks for QuantLib's quantlib-config script, and I didn't know the correct syntax to tell the configure script the correct path to QuantLib. Executing the procedure from R (by just installing the package) sorts out any problem, as all the dependencies are correctly located and loaded
So, that's pretty much it: just install the .tar.gz source package as you would do with the binary version, and everything should work ok.
Of course, I'm still curious to understand:
If it is possible to compile Rcpp and RQuantLib from the terminal; and
Why the binary version for Mac OS X will not work on my system, ie: why do I have to compile starting from the source code?
Thank you so much to anyone willing to answer my (probably naive and silly) questions. I'm eager to understand a bit more!
Thanks!
The RQuantLib package uses a tool called configure which determines the patch at package build-time. It looks for the script quantlib-config from which it learns about the location of libQuantLib.a.
First, install boost (brew install boost) and, secondly, Quantlib (currently at 1.7.1) by following instructions at http://quantlib.org/install/macosx.shtml:
cd QuantLib-1.x.y
./configure --enable-static --with-boost-include=/opt/local/include/ \
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/
make && sudo make install
It takes some time (~1 hour) for make.
Then in R or Rstudio, install packages Rcpp and RQuantlib. The later requires type="source" since only source package is available.
At this point, you should be able to use RQuantlib. The American Option value (SPY as of 4/1/2016, maturity 7/15/2016) can be calculated in R as
AmericanOption("put", strike=206, volatility=0.1525, underlying = 206.92, 0.021, 0.003, 73/252, engine="CrankNicolson")

Is it possible to use LuaInterface in Mono/Mac OS?

LuaInterface uses two .dlls: lua51 and luanet.
While being able to rebuild lua51 to liblua5.1.dylib (and code actually found all necessary entry points) im completely stuck with luanet.dll.
Does anyone have an idea how to build it on Mac OS or if I have to avoid using it entirely (at cost of losing such stuff as ObjectTranslator and MetaFunctions)?
I already know that there are alternatives like http://github.com/jsimmons/LuaSharp.
You need to configure your DllMap to tell it that luanet.dll should be looked for at lua51.dylib
http://www.mono-project.com/Config_DllMap

Resources