pybind11 with C++ that needs linking with static library - pybind11

I apologize in advance if this is obvious.
We are investigating using pybind to bind Python to our C++ code. Everything seems to work fine until we have discovered a problem. Our software builds and links with various static libraries (mostly stubs that load various DLLs like Intel IPP).
To clarify the problem, the C++ code makes calls to functions in libraries, and I can't figure out how to link these libraries with pybind11, so that the code in the libraries is available.
I have poured through the documentation and through stack overflow and simply cannot find how to do this.
If this is not obvious and easy to answer, I can supply a MWE, if needed.

Related

how to import c code to TwinCAT

I am quite new to TwinCAT 3.I am trying to import a C code from Dymola to TwinCAT 3.I have gone through BECKHOFF manual but it didn't help much.
It would be grateful,if you could help me.
Ok, i understand. Beckhoff place restrictions on both how the code is put together and how much of the language / frameworks you can use. You can't use third party dlls either (so the wrapper idea is out). You can import modules that have been put together in the TwinCAT way.
To start with, you will need to port your code into TwinCAT C++ directly, following the method of putting modules together, as per the instructions you followed. How much you'll actually need to change depends on the complexity of the c code, of course. A lot is syntactically identical. You can Google "compile c code for c++" for the main differences.
I'm no expert on the c++ bit of TC3, but this is my understanding. All the best with it!
LazzMaTazz

Documentation Generator for NetLogo model files

I recently stumbled upon the Doxygen Documentation Generator for C++ and especially Qt Code. It generates Documentations in different formats (html, pdf, ...) and includes stuff like Model-Flow-Diagrams. The documentation primitives are used directly in the code, instead of maintaing it seperatly (like in the NetLogo Info Tab). Unfortunately, doxygen does not support Netlogo Models. Do you know any similar tools or extensions for automatic Documentation creation with Netlogo files?
If such a thing existed, it would almost certainly be listed at http://ccl.northwestern.edu/netlogo/resources.shtml .
Can't be 100% sure no such thing exists, but 90%+ sure.

Common Lisp; Paradigms of AI Programming examples not working

I got Paradigms of Artificial Intelligence Programming because I've read tons of good reviews about it, but every example have errors, I tried using SBCL and Lispworks on windows 7.
For example, I'm trying to write a scheme interpreter, this file has undefined functions, this file has undefined operators, and this file, there's something wrong with REQUIRE.
Google didn't help, it seems that I'm the only guy having these errors. The book is really amazing but I'm dying to see a working code. would you please copy/paste and see if it works for you? Is it only me who has these kind of errors?
Should i try a Clisp or something? Should i contact the author asking him to correct his code? but he is a director at google now, he won't reply to a stupid guy like me, therefore i'm coming here for help, you can't find lisp experts everywhere
Your problem is that you are treating each file as a stand-alone system. They are not independent, but build on each other.
You need to follow the instructions in the README file you link to instead of loading the individual files.

C++ static library to be used in XCode

This is probably not a simple question so I am not looking for a definite answer but just some pointers to get me in the right direction.
I have absolutely no experience with C/C++ but have good knowledge of Objective-C. I also don't know much about different compilers and architectures so please be nice if I am talking stupid :)
I have some MatLab code that needs to be ported to Objective-C to run on an iPhone application. My first tentative path to get this done would be to check if MatLab can export the code as a static C/C++ library that I can call from within my Objective-C code.
This seems to be the case but I am not entirely sure what to do next, and what things I need to keep in mind when compiling the library on the MatLab side (i.e. architecture, compatibility, PC vs Mac, etc).
I have been provided with a .DLL and .LIB files which I believe are Windows compiled so they will not be useful for me, is this correct? From working with previous static libraries I can see they all have a .a extension - what do I need to do to get one that is compatible with the iPhone architecture?
And once I get the library compiled, how to I import and use it within my project? Will I just be able to call the public methods directly from within my code?
What else do I need to know or be aware of?
Any help is very much appreciated!
Thanks,
Rog
Static libraries contain binary code tailored for some specific operating system and platform. That means that it will use the OS to internally acquire memory (if it uses dynamic memory) or to perform any other OS specific operation (logging, output).
Even if the generated code was completely OS-agnostic (basic math could be implemented without OS support), the platform is completely different, matlab will generate code for an intel platform and the iPhone runs in an ARM architecture, with a different instruction set calling conventions...
Unless matlab is able to generate static libraries for the iPhone or at the very least for an ARM platform and make it OS-agnostic, you are out of luck.

How do I use a 3rd party C library in Xcode for my iphone project?

love this site and all helpful people! I'm newbie to Xcode and iPhone programming but I've pretty much got the hang of using the SDK to make programs in Obj-C (simple programs right now but make me happy). My experience is web programming (such as PHP and Perl) and I'm not really used to a lot of the new Xcode/desktopy-app stuff like static libraries and linking and such. I be honest, I am not total awesome programmer yet!
I have a problem right now, my (card game) program I am writing needs to use this C library. I don't really understand how I get the proper C files and integrate them into my project so I can start using the commands in that tutorial to evaluate hand values.
I hope I have been clear, please let me know if there is anything I am leaving out. Unfortunately, my newbieness may prevent from me making everything so clear and sometimes I can't english perfectly what I am thinking!
Happy thanks in advance, looking forward to any help!
Couple things:
The library you linked to is quite large. Pokersource appears to be a large C project containing all sorts of things like language bindings and some GUI tools as well. A project that large certainly has an IRC channel. I would recommend going there.
The library you linked to appears to be (I may be wrong about this), licensed under the GPLv3. This means that any program that you distribute to others that uses a GPLv3 library or piece of code must also be licensed under the GPLv3. The upshot is that if you use that library, you'll have to release the source for your game.
The site you linked to does seem to have a long list of other poker hand evaluators, so its possible one of them is suitable for your needs.
Good luck!
it's totally possible to use third party static libraries with your iPhone and using Xcode. This webpage illustrates the process of doing it.