I have a project written in C++ and I want to call some functions of it from Maple. Searching about possible solutions, I found the one to create .dylib from the C++ files and then call this .dylib from Maple.
I was able to create a .dylib from a single C++ file and use its functions from Maple, following this: How do I create a dynamic library (dylib) with Xcode?
Now, I'm wondering if I can do it with a full project. I saw that maybe I could do it using Xcode (I have the version 6.4), but I don't know how...
Someone could help me? Any help is appreciate, thank you in advance!
Related
I'm trying to add a static library to my C++/ROS project and having trouble wondering where to start. I have the project currently working with a CMake file to build it and have downloaded (and can build) an external static library that I want to use in the project.
I am very new to CMake and C++ in general and am working on a project that I haven't created myself. I've read a lot of tutorials on how to add libraries but I'm stuck at knowing where to start as I know there are many different steps needed. I was looking at find_library(), add_library() and ExternalProject_Add() but I don't really understand the difference and the documentation doesn't make it much clearer. As it stands the CMake file has very little in it so I was wondering what exactly I need to add and what commands are best just to be able to use this library in my project. Specifically, I guess what set of commands would I add to a pretty empty CMake file for it to work given I have the lib.a file. Sorry for the vagueness but any help would be appreciated.
I'm trying to use the xgboost library to basically translate a model I developed in R to C++.
I've not used an external library and other sources online did not help me much so decided to ask the question here to hopefully find the way to do it.
Here's the library I need to use in my C++ code: https://github.com/dmlc/xgboost
I'm using Visual Studio Ultimate 2013. I have a make file that I use to define my project.
I am looking for the proper way to use this library in my C++ code.
If you have ever used this library before, I really appreciate your help. Any hint will be appreciated.
To use the library, one needs to first build it. I could not manage to build the master branch. So, I decided to use the V0.4 instead. I built the solution in that branch using Visual Studio and it produced the dll and lib files. One can then import the .dll file by using Add_library to add it via Cmake. After Add_library, the include directories need to be added by include_directories command.
I need to generate .a and .so files in the end. I'm working in windows and could not find a way to generate these files, yet!
So I found the way to resolve this issue. I shared it in another answer
Add an external library (e.g., Eigen) via CMake
Hope this helps people who are looking!
I am unfamiliar with C++ but I got a project that needed to deal with it.
I need to use a library available online, RtAudio, and of course I need to
import it in my program.
My question is, how do I use/do it?
Here is my understanding on the library, I am sure that I am totally wrong, but
just to tell where I am.
I think i cannot use the file that I download directly but change it to a lib file and a dll file (as I have use some other precompile library before and it only require a dll and lib file[.h too of course]; I know how to put these into MSVC 2015 and use it).
And also I think in order to compile the library into dll and lib file I need to do something with the follow file in the cmd in window: configure, install, and makefile.in
I am desperate as I had already given up using another library before as I do not know how to deal with this, therefore it will be nice that if anyone can give any help. Thanks.
Iam new to C++ and I am trying to add NLopt library to C++ using VS 2013. NLopt is a non-linear optimization library (http://ab-initio.mit.edu/wiki/index.php/NLopt_C-plus-plus_Reference#Compiling_and_linking_your_program_to_NLopt). NLopt has a DLL file and .h file and I cannot figure out a way to get them work. I appreciate if anyone can give me a quick guide on how to import this library.
Thank you in advance.
Here's what you'd want to go through: DLLs in Visual C++ - http://msdn.microsoft.com/en-us/library/1ez7dh12.aspx
More specifically, gauging from your question you are probably looking for Implicit Linking - http://msdn.microsoft.com/en-us/library/d14wsce5.aspx
And if all of that sounds confusing to you, you might go through this walk-through first: http://msdn.microsoft.com/en-us/library/vstudio/ms235636.aspx
I'm a newbie when compiling and adding 3rd party C++ libraries into XCode... So here's the problem. I have .cpp files wich depend on 3 libraries. OpenCV-Eigen-SuperLU. So far think that I managed to add correctly OpenCV-Eigen, but I got trouble adding SuperLU.
I'm really confused on where should I include source files paths??. Some tutorials say that I need to create a static lib... other that I need a framework... on the other hand there are XCode project template which just include src files into a folder inside XCode project's and then reference them from build setting properties. Anyway I really need some guidance here.
So here's my setup for most of the libs. I have a folder within the XCode project with all dependencies.
Then... on project build settings I setup header search paths-- and library search paths. To point that folder
Headers for SuperLU are found correctly... but I get Linker errors.
So as you can see, I have no idea what to do... I'm Sorry but as I told on beginning I'm a newbie adding libs into XCode... plus documentation of procedures it's not good at all. So if anybody could help me with some guidance or links where I can start understanding how the linking process works would be great.
I'm a little desperate at this point, os any kind of help would be really really great.
Thanks a lot.
The problem is that both SuperLU and Objective-C define YES and NO. So you get a conflict.
In the end I was advised to create a different target to compile all SuperLU as a pure c++ project with gcc compiler. That made it possible for iOS app to use the lib as a dependency.