maybe the title is not the most helpful but wasn't sure how to put it with a few words.
So this is my problem.
I have some C++ projects in Eclipse and I want to use for a part of my project some Julia code.
I have downloaded and installed properly the latest version of Julia on my machine and what I want to do is embed Julia inside my C++ project in Eclipse, so that I will be able to write directly some julia code inside the C++ project.
Such an option is possible and there is this guidance on how to do it.
I do properly in eclipse both the path to include julia.h and the julia library, and I can actually build the project, but when I try to run I receive the following error:
"System image file "/home/kostav/workspace/juli/Debug/../lib/x86_64-linux-gnu/julia/sys.ji" not found
"
Now this file does exist and its path is included in Eclipse, so I really don't understand why I do receive this error and what should I do in order to fix it.
Any suggestion would be really helpful to me.
jl_init_with_image
jl_init_with_image("pathtosysji", "sys.ji");
The path must be the abs path.
ie: /home/kostav/workspace/juli/Debug/../lib/x86_64-linux-gnu/julia/sys.ji
Related
The source code of the IDE is uploaded by at this site but i do not know how to use.
I came from programming in using IDE like netbeans and visual studio where you can just open the project(the code), edit, then COMPILE. I want to do the same for the source code of the IDE DEV C++, how do i do this?
Here's what I did:
After downloading and extracting the latest source, I looked into the Source folder
I noticed the *.pas file extension, since I did work with Delphi before I new it was either Turbo Pascal or Delphi (if you don't know the extensions, there are many great search engines who can tell you what kind of file you are looking at)
I opened the README.txt inside the Source folder, which tells me to compile Source\VLC\DevCpp.dpk. Again, I have worked with Delphi in the past, so I knew this is a project file (the extension means Delphi Package Project). *.dof is an older extension (Delphi 7 and older, the extension means Delphi Project Options File).
So, in short: Look at the file extensions and see if you can locate a README (or a similar named file) anywhere in the downloaded files. This should help you to figure out with what you are dealing and how you can open the project.
I am trying to program in C++ using Eclipse. However, this requires Eclipse to work on different computers with a MinGW compiler installation everytime. I know that it will work if I install it on a computer and add the location to the PATH variable, but I want to know how to put the compiler onto my USB as well as the Eclipse program and make it work the same way.
It should be installed in such a way that Eclipse can find the compiler on my USB (without the PATH stuff and C drive installation) and compile my program successfully without giving a "Binary not found" error because it could not build my source code.
I've solved this problem with Eclipse Java and am completely able to write and compile Java code. However, I don't know how to do it for a C\C++ Eclipse. Can someone help me with this problem?
Thanks in advance!
You do not need to alter system-wide path variable to help Eclipse finding your compiler. Simply create a batch file, which modifies and exports PATH. For example, put the following in the same directory as eclipse executable:
set PATH=%PATH%;path-to-mingw-bin
your-eclipse-executable
Save it as, for example, StartEclipse.bat, and execute it. (of course your-eclipse-executable should be given relative to the working directory of the batch script, and path-to-mingw-bin must be an absolute path)
You can install your MinGW anywhere, not necessarily in C:\, so installing it shouldn't be a problem.
I'm using the ArUco library with OpenCV (more information here) but I can't find a way to build and run a program from scratch.
Once I installed the library I have access to different examples but if I want for instance to create a new file and add the library headers inside it, how can I compile and run it ? (with a command line or IDE, anything is fine)
Thank you
I sent and email to the library's author and he added clear instructions at the end of the project webpage :)
It seems you need to learn how to use your IDE's, compilation tools and general compilation basic stuff. This is not a question related to Aruco, or mostly any other tags you have set.
Try to lean CMake first, 'cause Aruco compilation is based on CMake: http://www.cmake.org/
You can start by just editing the aruco_simple example.
For a IDE that works right away with CMake you can try either Qt Creator >3.1 or KDevelop. Both free.
I've been developing a lot in Java lately but I've been asked to look at switching one of my projects to C++ and I'm having a bit of trouble setting up the includes. Unfortunately the extent of my C++ knowledge is a couple of academic projects I did in college.
I have created a project in NetBeans and I'm trying to add in some headers from an external library (pugixml). I have
#include "pugixml.hpp"
at the top of the file I intend to use it in. The problem is that when I compile I get
main.cpp:9:23: pugixml.hpp: No such file or directory
which seems odd to me seeing as the IDE definitely knows where the file is. Code completion on classes from inside the library works and holding control and mousing over the file name shows me the correct directory where the file lives. How do I convince the compiler to include this directory?
I know this really feels like something that should be easy to Google, but I haven't had any luck.
if you are using a makefile on linux:
check your makefile and add the -I Path_to_your_pugixml_hearders in the option of its compilation recipe.
or, add your path to the environment variable $CPLUS_INCLUDE_PATH. for example, in bash
export CPLUS_INCLUDE_PATH=Path_to_your_pugixml_hearder:$CPLUS_INCLUDE_PATH
I'm working on a project using C++, Boost, and Qt. I understand how to compress single files and bytestreams using, for example, the qCompress() function in Qt.
How do I zip a directory of multiple files, including subdirectories? I am looking for a cross-platform (Mac, Win, Linux) solution; I'd prefer not to fire off a bunch of new processes.
Is there a standard way to combine bytestreams from multiple files into a zipped archive, or maybe there is a convenience function or method that would be available in the Boost iostream library?
Many thanks for the assistance.
Update: The QuaZip library looks really great. There is an example in the download package (in the "tests" dir) that shows very clearly how to zip up a directory of files.
Update 2: After completing this task on my Linux build environment, I discovered that QuaZip doesn't work at all with the Visual Studio compiler. It may be possible to tackle all those compiler errors, but a word of caution to anyone looking down this path.
I have found the following two libraries:
ZipIOS++. Seems to be "pure" C++. They don't list Windows explicitly as a supported platform. So i think you should try your luck yourself.
QuaZIP. Based on Qt4. Actually looks nice. They list Windows explicitly (Using mingw). Apparently, it is a C++ wrapper for [this] library.
Ah, and of course, i have ripped those sites from this Qt Mailinglist question about Zipping/Unzipping of directories :)
Just for the record...
Today, I needed to do something very similar in Visual C++. (Though wanted to maintain the possibility to compile the project on other platforms; however preferred not to adopt Qt just for this purpose.)
Ended up using the Minizip library. It is written in plain C, but devising a simple C++ wrapper around it was a breeze, and the end result works great, at least for my purposes.
I have built a wrapper around minizip adding some features that I needed and making it nicer to use it. Is does use the latest c++11 and is developed using Visual Studio 2013, so it should work out-of-the-box for you.
There's a full description here: https://github.com/sebastiandev/zipper
you can zip entire folders, streams, vectors, etc. Also a nice feature is doing everything entirely in memory.
Poco::Zip is also a choice, it has clearly documentation and some code for demo.
Poco::Zip Document
system("zip myarchive.zip *");
I tried QuaZIP 0.4.3 on Windows with VisualStudio 2010 -- there are still issues but can be resolved easily.
To build with VS:
Use CMake to configure and generate VS solution for QuaZIP.
Open soltion with VS and build -- you'll first notice that it can't find 'zlib.h'.
Open preferences for quazip project and add path to Qt's copy of Zlib to C/C++->General->Additional Include Directories: $(QTDIR)/src/3rdparty/zlib.
Rebuild again and you'll get lots of warnings and one error C2491: dllimport static issue on QuaZipFile::staticMetaObject.
This is because QuaZipFile is declared like "class QUAZIP_EXPORT QuaZipFile" and QUAZIP_EXPORT needs to resolve to Q_DECL_EXPORT for dll and to Q_DECL_IMPORT for application, based on whether QUAZIP_BUILD is defined or not. When building QuaZIP QUAZIP_BUILD should be defined but isn't -- configuration process defines in error completely useless "quazip_EXPORTS" instead.
To fix, just remove "quazip_EXPORTS" from all build configurations and add QUAZIP_BUILD instead -- QuaZIP will now build fine.