how to install FLTK for VS CODE I have configured vs code for c++ and I want to use vs code for FLTK also, there is no good guideline for the process and I did not manage to install it according to FLTK help documents, I do ./configure make, and after make install but I cannot run the code. I will list down what I did here:
download and unzip file on c:/dev/flsk/
I had mysys2 but when I tried to run the command like ./configure to configure FLTK it gave me some errors, so i downloaded MingGW with dev toolkit and after run MinGW shell.
run commands: ./configure, make, make install
that was all, now I want to compile my c++ code but it cannot access FLSK Libraries what can I doo? I want to run the code from the book of Bjarne Stroustrup name Programming - Principles and Practice Using C++ chapter 12
thank you;
#include "Simple_window.h"
#include "Graph.h"
int main()
{
using namespace Graph_lib;
Point tl {100,100};
Simple_window win {tl,600,400,"Canvas"};
Polygon poly;
poly.add(Point{300,200});
poly.add(Point{350,100});
poly.add(Point{400,200});
poly.set_color(Color::red);
win.attach (poly);
}
I have a c++ console app project created on my computer with Visual Studio 2019. In this project i need to use redis-plus-plus library. I have installed this library on my computer with vcpkg and i can use it in my project.
#pragma once
#include <string>
#include <vector>
#include <sw/redis++/redis++.h>
class RedisConnectorHelper
{
static sw::redis::Redis _redis;
...
}
The problem is when i publish this project to a github repo, anyone who clone my repo cannot run or debug this project because they don't have redis-plus-plus installed on their device.
So my question is: is there anyway for them to clone my repo and use right away without having to manually install redis-plus-plus on their own computer?
I'm having trouble getting GLFW to work on my Xcode 8 and getting the demo from the website working in Xcode. I'm using c++ through the command line type project in Xcode and I imported the cocoa and OpenGL frameworks. Using MacPorts and using sudo port install glfw, I got the libglfw.3.2.dylib and imported that framework into my project. However it still cannot recognise
#include <GLFW/glfw3.h>
As for some reason, Xcode is unable to find the file. What am I doing wrong? My aim is to create a graphical standalone executable file from Xcode through c++.
You need to set search path in "Build Setting" to be where header file is, like for example: "/usr/local/include"
I hope someone can help me. I have a c++ file which use opencv libraries.
I need to get an executable for an ARM in which I have to run it. My executable should be compile in a static linker way.
I am not an exepert so sorry If I am doing something weird, I follow this steps:
I download the opencv for ARM libraries, I build it with the cmake and I got the statics opencv ARM libraries without problems.
Then I try to compile my c++ file like this:
arm-linux-g++ -static -o exampleWindows IPCamera.cpp `pkg-config --cflags --libs opencv`
And it works, so I got an executable, I write:
file executable
And I get this output:
ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.26, not stripped
So it seems that is ok, is an ARM format and is a static linked. But when I try to run this executable in my ARM is comming this error:
OpenCV Error: Unspecified error (The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support.
If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config,
then re-run cmake or configure script) in cvNamedWindow,
file /home/jesus/opencv/opencv/modules/highgui/src/window.cpp, line 483
terminate called after throwing an instance of 'cv::Exception'
what(): /home/jesus/opencv/opencv/modules/highgui/src/window.cpp:483: error: (-2) The function is not implemented.
Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config,
then re-run cmake or configure script in function cvNamedWindow
Then how I am not an expert I tried to follow what the error message says, so I donwload the libgtk2.0 in my ubuntu, and then I make again the cmake and make for build the ARM static libraries, but nothing is solved.
So I need some help with this error, or tell what is the meaning, because it seem that is simple but I do not know what to do.
Here is my code:
#include <iostream>
#include <pthread.h>
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv/highgui.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
using namespace std;
using namespace cv;
int main()
{
cout<<"ready"<<endl;
cv::Mat frame;
cv::namedWindow("front", CV_WINDOW_NORMAL);
cvMoveWindow("front", 0, 0);
cvSetWindowProperty( "front", CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);
return 0;
}
Thank you so much I hope someon could help me.
The problem is that you need to rebuild OpenCV with the GTK-support activated. The necessary steps are:
Install gtk (sudo apt-get install libgtk2.0-dev, I think you did this already ;) ).
Rebuild OpenCV:
If you installed it from the repositories, re-install it (I think this is not the case).
If you manually built OpenCV from source code: run cmake with it again, making sure that the option WITH_GTK is marked (you can use the CMAKE GUI to activate that option).
Once the Makefiles have been re-generated with CMAKE, run make, make install and don't forget ldconfig.
Try again with your code ;)
Hope that it helps!
The problem is due to the fact that, you did not enable the GTK+ library support .
To enable it
1)install the GTK+ Libraries, if you don't have them
2) re build the libraries with including this -DWITH_GTK=ON
hope that this will work...
run ccmake . and enable WITH_GTK and WITH_GTK_2_X
run make && make install
ldconfig
I haven't used C++ in a while but I was able to setup eclipse and setup the basics. I need to write a program using libserial to communicate with a MC and I'm clueless on how to add the libserial library. I was able to download it from the official website (http://libserial.sourceforge.net/) but cant figure out how to install it.
Can anybody put up a quick Tutorial on how adding libserial to an eclipse project. Until now my includes give me an unresolved inculsion error at these lines:
#include <SerialStream.h>
using namespace LibSerial;
thanks.
PS: I'm new to programming on ubuntu