How to use Ruby in C/C++ [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have some experience in C/C++ but I am new to Ruby. So today I got a task from my teacher to use some other languages to create a shared library (in my case, .so) that I will use in my C++ program. I wanted to try Ruby for a long time, but now when I compiled, installed and played with it a bit, I have no idea what's next.
I googled alot, but all I can find (SWIG, Rice) is related to using C/C++ in Ruby, not Ruby in C/C++. Is it possible? Am I wrong with SWIG and Rice and I actually CAN use them vice-versa (ruby for c, c for ruby)? If it is so, can you please attach any guides about that?

Ruby is an interpreted language, and I've never seen it compiled. What I know is that you can drop into C/C++ from within ruby. It's unclear what you're trying to accomplish. You might be looking for something that doesn't exist or make sense?
In Ruby, libraries are called gems, which are a collection of classes modules and other related files.
If you're looking for information about similarities between ruby and C/C++ this might be a good starting place. https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/
Other than that, please do some more research and refine your question.

Related

C++ application with neat codebase to learn from [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm searching for an application written in C++ with a neat codebase, to learn from and maybe even contribute to it. A lot of applications written in C++ are either very large or doing some really advanced stuff, which is just the domain of C++.
A good candidate of size and shape would be something like pacman and libalpm from Archlinux, but it is written in plain C, not C++. WebKit is just far to big and Protobuf is looking awkward. Gnote looks to be a good starting point and I'm also using GNOME, but I wasn't sure about it because it offers a GUI. Which brings me back to pacman; I'm already using it myself and it doesn't distract with stuff like a GUI.
So I decided to look for something small and sane, which offers a CLI and which I can use myself. I opened the search of github with the terms note + c++ + stars and the result is taskwarrior. A brief look on the source of task(warrior) looks promising.
Do you know a neat project which written in C++?
Thanks

Very easy to use 2d (optionally 3d) drawing library / wrapper for directx or opengl? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm studying physics and I know C++ at a basic level. at my study it's sometimes really useful to create a program which can graphicly represent some data or do calculations and then graphicly represent them. I read that, for example, to be able to master the basics of openGL I would need to do a 10 week long course of openGL. But that is too much time.
I'm wondering if there are any libraries available (for windows) which allow me to do some easy stuff like:
-DrawPixel(x,y,color)
-DrawCircle/Line/Shape/Polygon([list of points])/Triangle/Square (+rotation)
-DrawImage(filename,width,height,etc...)
-DrawText()
Is there any library which has this easyness? It would be really cool because if I do something (create a program) and I need to explain my team (who have never programmed) how I have done it (the program / results), this would make it much easier to explain!
I looked at SDL, HGE, OpenFrameworks (somewhat the "closest" yet still far away) and a few other popular libraries but they are all so far away.. why is there no such easy library?
Are there any available which are just not being found with the keywords i search in google?
I would suggest that you take a look at cinder. Try out the Hello Cinder tutorial. I think you will find it supports your needs by providing an abstraction layer above DirectX or OpenGL.

Integrating Latex into my desktop application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm searching for a consultation, or maybe an opinion, a suggestion, or something like this.
I'm starting a project (desktop application) that is something like an IDE for writing books/reports. I'm planing to introduce LaTeX features, if I can name them in a such way.
So the question is: Is it possible to integrate a LaTeX script or plug-in in my software in order to have the needed features?
Waiting for questions or suggestions on my topic.
Thanks in advance!
P.S. Sorry if this topic was already posted.
Not sure I understand your question correctly. I never heard of some kind of LaTeX library or plugin of some kind, which is readily available to be integrated in other programs.
You tagged your question 'qt' so I assume, you use Qt as your framework. The only way I see to integrate LaTeX into Qt is using QProcess. Write your LaTeX code, start pdflatex with QProcess. The question then is if you can do something with the created pdf file.
Look for MikTeX and TeXworks. If you google those, you should be able to get the links to download those. That should do what you need.

Embedd Python into C++ to perform OS operations [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need to make a Python embedded C++ program that can open programs, like Skype and Firefox.
It will have to be compiled into an executable, or have a batch file run it. (It is for Windows 7 x64 bit).
I know there are tutorials out there, but none of them give any insight into how to do OS operations. Please no boost libraries if at all possible, the documentation for those is really confusing to me.
If there are any examples, tutorials, templates, or anything else besides the boost libraries that would be a huge. Python 3 or Python 2.7 is good, it doesn't matter either way.
Or if anyone has any tips, or any help at all would be much appreciated.
Edit::
Sometimes I don't even know why I bother asking for help on this site when this is the quality of responses I get to a question like this.
Firstly, if you plan to embed python into a C++ program only because you want to launch other programs, then you are swatting a fly using a sledgehammer.
Use the subprocess and os modules in Python to perform your task using core python itself.
However, if your embedded python module is a part of a larger application being developed in C++, then refer to Extending and Embedding Python interpretor for more information oh now to do this task.

Idea's for making a workbench type interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking at MeVisLab's interface for generating views of data and I find that that way of viewing control structures is extremely intuitive.
It is especially the connected boxes I'm liking, is there any kind of framework that supplies this sort of interface. I know it can be done using Qt but beleave it takes ALOT of work.
Does anyone know of frameworks for making this type of gui?
This is not c++, but i think it covers your problem, so i would suggest WireIt.
Examples:
http://neyric.github.com/wireit/plugins/editor/examples/logicGates/index.html
http://neyric.github.com/wireit/plugins/composable/examples/jsBox/jsBox.html
It is a Java Script library, so the browser would be your GUI. But i really think, that using the browser is a good thing to do. Learning HTML, CSS and Java Script is about as difficult as learning a new GUI framework. You could concentrate on HTML5 and ignore old browsers and maybe use a nice lib like jQuery, which is like the boost of js. Even if your GUI would only work on Firefox you would still support more platforms than most GUI-Toolkits.
You would of course have to embed a small http-server in your c++ code, you could use libmicrohttpd or mongoose for that.
In the end you have used tools that are very reusable and will have a broader applicability than GUI Frameworks.