Sorry if the documentation is clear on this, but I'm having a hard time running C++ files in OpenBR. I've tried running them through the terminal via g++ and via the QT interface to no avail.
Ultimately I don't see any way to create (nuanced) custom OpenBR scripts than by using the C++ API, but I can't even run the provided demos (age_estimation.cpp, face_recognition.cpp etc.).
I'm running this on Ubuntu for reference.
To run the example files you first have to download the dataset. The scripts/downloadDatasets.sh is in the openbr directory.
In the qt interface after opening the upmost CMakeList and building openbr you can select what to run on the bottom of the left toolbar, and then click the "play" arrow below to run the executable.
Related
I'm trying to build my first Unreal C++ project on Linux.
I built the engine from source in accordance with "Linux Quick Start" guide. Then I installed Qt Creator and followed the "How to Set up Qt Creator for UE4" guide.
I successfully set up and ran UE4Editor, and created a new C++ project. Unfortunately when I try running the project it complains:
And when I press "yes" this error message is shown:
Here's the error message from the logs:
ERROR: Building would modify the following engine files:
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Android/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/2D/Paper2D/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/AI/AISupport/Binaries/Linux/UE4Editor.modules
... many more
I tried rebuilding UE4 from IDE, then building again - but the error still persists. Same thing happens if I try starting UE4Editor from the engine files and opening the project from there.
What could cause this error? Why does it even try to rebuild the engine when I'm tring run a project?
I have the following script to add the paths to the engine scripts and binaries to my PATH:
UNREAL_HOME="/path/to/source/of/UnrealEngine"
UNREAL_SCRIPTS="${UNREAL_HOME}/Engine/Build/BatchFiles"
UNREAL_SCRIPTS_LINUX="${UNREAL_HOME}/Engine/Build/BatchFiles/Linux"
UNREAL_BINS="${UNREAL_HOME}/Engine/Binaries/Linux"
PATH="${PATH}:${UNREAL_BINS}:${UNREAL_SCRIPTS}:${UNREAL_SCRIPTS_LINUX}"
export PATH
Then I run UE4Editor '/absolute/path/to/project.uproject' from within the directory of my project.
I never create a project inside the source tree of the engine. Paths should absolutely be different.
I use VS-Code as the IDE. This is what works best from my experience. QT-Creator will work only if you create an include files with lots of #define that are missing from the .pro files created by unreal.
You can configure VS-Code to have an intelli-sense like completion by installing the C# and C/C++ extensions. I had to install mono in order to get OmniSharp working (this is the server than handles the autocompletion for VS-Code). Here is an extract of my VS-Code settings.json file:
"omnisharp.path": "/home/myuser/.vscode/extensions/ms-dotnettools.csharp-1.23.9/.omnisharp/1.37.6/omnisharp/OmniSharp.exe",
"omnisharp.monoPath": "/usr/bin/mono",
You can also install the C++ Helper extensions which is usefull for creating methods, classes, and so on.
In the directory of your project run 'make YOURPROJECTNAMEEditor', then you can run 'open YOURPROJECTNAME.uproject' and it should open.
I wanted to play around with the Live Motion code I found on github at this link.
I am fairly new but I thought that all I need to do is clone and download the link. I opened it in VS code (I ran the hello world code in c++ so I assume I have configured it properly). I basically cloned the repository and all files and folders appeared as follows:
However, I am confused as to how I can run the entire project. Previously I would just click on the project name, build, and it would create the exe file. That doesn't seem to exist for cloning the repo.
I need some basic guidance to how I simply run the entire project from github.
I did install QT Creator 5.9.9 and it also shows up in my Visual Studio.
But I am still unsure about how to run the software and if anyone was able to get it to work?
Thanks
Greetings for the first time:
Usually I can work my way through problems like this but I think I need help for this one.
I have developed a small utility for myself to plot some data using Qt and Qwt under Mint. When I run the application from Qt Creator everything works fine. Once I added (export LD_LIBRARY_PATH="/usr/local/qwt-6.1.3/lib") to my .bashrc file, I can invoke the application from the terminal with “./PlotAccountsChange” and it woks. Also the ldd command shows all dependencies have been found.
The problem I am having is that the application can not be invoked from the Nemo file manager, or from the menu system if I add the link to the executable in the menu, or from a link to the executable placed on the desktop. In all of these cases I get no indication at all, just nothing happens. Any other application that I have created using Qt but that doesn’t use Qwt invokes without problems.
Thank you, regards,
B Kace
I have managed to understand the structure of chromium browser and now I would like to use an IDE in order to make some changes for a personal project on a Ubuntu Trusty machine ( 14.04 ).
It is already compiled and I just want to use an IDE to make my life easier.
I have tried to add chromium to Qt Creator by using the option open project but without any luck.
Could you please guide me to have this achieved ? Some steps would be really helpful. More, it would be possible to compile / build chromium from Qt Creator ? ( avoid typting in console ninja -C out/Debug chrome chrome_sandbox and out/Debug/chrome every time)
If you guys can suggest me another IDE that you're used to, please, guide me and I will change the title of the post.
//UPDATE 1
I tried to make those configurations for Build / Run as it follows:
Build:
Run
I get the following error:
:-1: error: No rule to make targetall'. Stop.`
//UPDATE 2:
The error from Compile output section
You can edit any code project in Qt creator, but you can't use Open project, when it isn't a Qt project. Instead use Import project -> Import existing project in the New project dialog.
When you have an existing project, you can define new build steps in the Projects tab. Under Build steps just choose Add Build step -> Custom Process step.
Here you can fill in your command using the fields Command, Arguments and Working Directory.
In your case, you would for example fill in ninja, -C out/Debug chrome chrome_sandbox and %{buildDir} for the first command.
Similarely, you can click on Run (on the top of this tab) to change how the your project is executed after successful compilation.
Just run in src folder:
gn gen out/Default --ide=qtcreator
And open in QtCreator src/out/Default/qtcreator_project/all.creator
I tried to create a C++ project in Eclipse Helios, it works fine for some simple "Hello World" projects (a single file etc..). However, now I have a little bigger project with several files, the project can still be built without any problems. Actually, when I get into the release folder, the makefile, object files, the actual binary executable are all there. And I could run the binary through the termainl. If I click the "Run/Debug" in Eclipse for this project, it always says "Launch Failed. Binary not found".
How could run the program in Eclipse? I would like to explore its debug features. In addition, I'm running eclipse in CentOS linux and I believe the basic g++, gdb setting etc.. should be all right, otherwise the daemon hello world won't work.
Warning: I have a very old version of eclipse and the CDT so the current procedure could have changed considerably.
In the C/C++ Project view, expand your project then expand the Binaries node. In there you should have a list of the built executables. Right-click on it and select the item Run As.. > Local C/C++ Application. This should automatically create a new run configuration which you can access from the green arrow icon and the little bug icon in your tool bar. Click on these to run normally or to run in debug mode.
If you want to tweak how programs are launched, goto to the Run configuration menu item of the green arrow icon. Select the configuration that you previously created or make a new one. You can then tweak the various launch settings like the executable to run, the arguments you want to pass, the required environment variables, etc.
Note that there's also a separate Debug configuration that can be accessed from the little bug icon in your toolbar. Within that dialog there's a Debugger tab which contains all the controls necessary to set up your debugger. Just randomly screw around with the controls until you find something that works for you.
I just had the same error, and here is what I did - proper binary parser must be selected so Eclipse can recognize the executable:
Select the project, then right click.
Project->Properties->C/C++ Build->Settings->Binary Parsers, PE Windows Parser
(or you can select Cygwin parser if you use Cygwin compiler, on Linux I use Elf parser).
That worked for me at least for Cross compiler (both on Windows 7 and Ubuntu 12.04)