I'm trying to build a project which depends heavily on GalSim and is very time-consuming. I've tried the Python API and Numba decorators, but none of them is satisfying. So I want to call GalSim routines in C++. However, I can not find any instructions on how to build a C++ library from source code. I guess that is possible given that C++ source code and headers are already there. Does anyone know how to do that?
Thanks!
Related
to calculate option price which use QuantLib,but QuantLib do not supported in goland.
"QuantLib is written in C++ with a clean object model, and is then exported to different languages such as C#, Java, Python, R, and Ruby."
https://www.quantlib.org/
QuantLib is exported to different languages using SWIG, which generates the necessary wrapper code. Unfortunately, SWIG for Go does not support the shared_ptr class, which is used everywhere in the interfaces. Therefore, QuantLib cannot support Go until this changes.
There is an issue open for SWIG on GitHub to add this feature (see https://github.com/swig/swig/issues/2030) but no working contributions so far.
I'm trying to use LLVM to implement a compiler for a toy language. Something like the Kaleidoscope Tutorial. I'm using Visual Studio on 64 bit Windows.
I've managed to build LLVM and clang using VS, but now I want to use the LLVM libraries in my own project. It seems like a silly question but how to I do this? What compiler options do I need? What libraries should I link with etc. etc.
As far as I can see this isn't covered anywhere in the LLVM documentation although I could have easily missed it.
I discovered llvm-config which is designed to solve the problems I'm having. It often seems to give incorrect information (for instance llvm-config --includedir is wrong) but it at least gives me a list of libraries to link with.
I suppose I could also use CMake to generate project files, but CMake seems to be difficult to learn from free resources.
I'm using an external preprocessor (pyexpander) for my cross-platform/cross-IDE c++ project*. GCC already works nicely with the -no-integrated-cpp -B${PWD} option. I could manually preprocess each file into a specific temp dir, then compile the processed files. But is there a better way? Specifically, I'd love to hook the native preprocessors so IDE-level code analysis is happy (code completion and error checking). Any hints how I can achieve this would be much appreciated.
*"But why not use c++ macros?" They can't do macro-macros and I need that.
*"But why not use m4?" Because python happens to already be a requirement for this codebase, and m4 seems to not come with MSVS and thus would be yet another requirement/point of failure. I would still have to resolve the original preprocessor problem.
*"But why not use language something_better?" Because I have no choice in the matter. (Though I would love to use nim all the way!!)
I'm trying to compile a project someone wrote in visual C on my Netbeans+cygwin, and there are a lot of libraries I don't have.
One of the problems is conio.h, and it seems like I can use curses.h.
How do I get curses library?
Use Cygwin, as larsmans suggested.
I'm fairly new to OpenCV and Visual Studio as well. My question is not so much technical but theoretically anyways:
I'm working on a bigger project but do not have access to all its subcomponents etc. I wrote a few classes and functions that other members want to use. However, I'm using some OpenCV specific things (because I'm lazy and dont want to implement everything all by myself) but the other members dont use it and they want to keep the project size relatively small.
My question is: How can I provide my code as a library or something similar that includes all my opencv dependencies? Can I create a dll of my code and just ship the opencv dlls with it? Is there a way to bundle everything into one file with only one header?
How would you solve this problem?
Summarizing: I want my functions in a library and shipped as small as possible (with opencv dependencies)
KR
Put all your code in a DLL, and then ship OpenCV DLLs along with yours.
Or: put all your code in a DLL, and perform static linking with OpenCV.