- Go to project properties (Alt+F7)
- Under Debugging, look to the right
- There’s an Environment field.
- Add your relative path there (relative to vcproj folder) i.e. ..\some-framework\lib by appending
PATH=%PATH%;$(ProjectDir)\some-framework\lib
or prepending to the pathPATH=C:\some-framework\lib;%PATH%
- Hit F5 (debug) again and it should work.
Adding folder to Dll in Visual studio Win32 apps
C/C++ Programming, Visual Studio Posted on 08 Jan, 2021 22:19:01- Comments(0) https://www.guivi.one/?p=124
- Share
GUI Libraries For C++
C/C++ Programming Posted on 30 Dec, 2020 09:55:02Qt
Sciter
wxWidgets
GTK+
gtkmm
CEGUI
Dear ImGui
Noesis GUI
Juce
Fox Toolkit
MiniGUI
Nuklear
NanoGUI
LittlevGL
neoGFX
morda
U++
dlib
nana
GWork
libui
Agar
FLTK
IUP
Boost.UI
LCUI
GLUI
TGUI
ivtools
GuiLite
Ultralight
Chromium Embedded Framework
CopperSpice
FlatUI
SFGUI
Lgi
Verdigris
- Comments(0) https://www.guivi.one/?p=81
- Share
Small program to stop the screen saver or screen blanking by moving cursor.
C/C++ Programming, Uncategorised Posted on 04 Sep, 2020 08:07:31#include <iostream>
#include <windows.h>
bool iskeypressed(unsigned timeout_ms = 0)
{
return WaitForSingleObject(
GetStdHandle(STD_INPUT_HANDLE),
timeout_ms
) == WAIT_OBJECT_0;
}
int main()
{
POINT cursor;
GetCursorPos(&cursor);
std::cout << "Press any key to stop the program!\n";
while (!iskeypressed(500)) {
cursor.x += 10;
SetCursorPos(cursor.x, cursor.y);
Sleep(1000);
cursor.x -= 10;
SetCursorPos(cursor.x, cursor.y);
Sleep(500);
}
std::cout << "Bye, Bye!\n";
return 0;
}
- Comments(0) https://www.guivi.one/?p=62
- Share
Simple Server Socket C++
C/C++ Programming, Linux Posted on 01 Jun, 2020 12:01:41This is a simple sever written in C++ and the original code can be found in “The definitive guide to Linux network programming” book.
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
const char APRESSMESSAGE[] = "APRESS - For Professionals, by Professionals!\n";
int main(int argc, char *argv[])
{
int simpleSocket = 0;
int simplePort = 0;
int returnStatus = 0;
struct sockaddr_in simpleServer;
// make sure we va a port number
if (argc != 2){
fprintf(stderr, "Usage: %s <port>\n", argv[0]);
exit(1);
}
// Create streaming socket
simpleSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (simpleSocket == -1){
fprintf(stderr, "Could not create a socket!\n");
exit(1);
}
else {
fprintf(stderr, "Socket created!\n");
}
// retrieve the port number for listing
simplePort = atoi(argv[1]);
// Set up address strucuter
//use INADDR_ANY
std::memset(&simpleServer, '\0',sizeof(simpleServer));
simpleServer.sin_family = AF_INET;
simpleServer.sin_addr.s_addr = htonl(INADDR_ANY);
simpleServer.sin_port = htons(simplePort);
returnStatus = bind(simpleSocket, (struct sockaddr*)&simpleServer, sizeof(simpleServer));
if (returnStatus == 0){
fprintf(stderr, "Bind Completed!\n");
}
else {
fprintf(stderr, "Could not bid the address!\n");
close(simpleSocket);
exit(1);
}
// Listen on the socket for connection
returnStatus = listen(simpleSocket, 5);
if (returnStatus == -1){
fprintf(stderr, "Cannot listen to socket\n!");
close(simpleSocket);
exit(1);
}
while(1) {
struct sockaddr_in clientName = { 0};
int simpleChildSocket = 0;
socklen_t clientNameLength = sizeof(clientName);
simpleChildSocket = accept(simpleSocket, (struct sockaddr *)&clientName, &clientNameLength);
if (simpleChildSocket == -1){
fprintf(stderr, "Cannot accept connections!\n");
close(simpleSocket);
exit(1);
}
write(simpleChildSocket, APRESSMESSAGE, strlen(APRESSMESSAGE));
close(simpleChildSocket);
}
close(simpleSocket);
return 0;
}
- Comments(0) https://www.guivi.one/?p=50
- Share
MFC C++
C/C++ Programming Posted on 04 Mar, 2020 10:23:27
Use DYNAMIC_DOWNCAST to get ribbon objects
- Comments(0) https://www.guivi.one/?p=46
- Share
OpenCV Aruco Marker Creator
C/C++ Programming Posted on 15 Nov, 2019 16:25:24This is a link to generate Aruco markers controlling the size of the market in mm
http://chev.me/arucogen/
- Comments(0) https://www.guivi.one/?p=4
- Share
Simplest Color Balance
C/C++ Programming Posted on 14 Aug, 2019 17:11:06void SimplestColorBalance(cv::Mat inArray, cv::Mat &outArray, int percent)
{
if (percent<= 0)
percent = 5;
inArray.convertTo(inArray, CV_32F);
int rows = inArray.rows;
int cols = inArray.cols;
int chnls = inArray.channels();
double halfPercent = percent /200.0;
std::vector<cv::Mat> channels;
std::vector<cv::Mat> results;
if (chnls == 3){
channels.reserve(3);
cv::split(inArray, channels);
}
else {
channels.reserve(1);
inArray.copyTo(channels[0]);
}
for (int i = 0; i < chnls; i++){
cv::Mat flat;
channels[i].reshape(1,1).copyTo(flat);
cv::sort(flat, flat, cv::SORT_ASCENDING);
double lowVal = flat.at<float>(0, floor(flat.cols * halfPercent));
double topVal = flat.at<float>(0, ceil(flat.cols * (1.0-halfPercent)));
cv::Mat channel = channels[i];
for (int m = 0; m < rows; m++){
for (int n = 0; n < cols; n++){
if (channel.at<float>(m, n) < lowVal)
channel.at<float>(m, n) = lowVal;
if (channel.at<float>(m, n) > topVal)
channel.at<float>(m, n) = topVal;
}
}
cv::normalize(channel, channel, 0, 255, cv::NORM_MINMAX);
//channel.convertTo(channel, CV_32F);
results.push_back(channel);
}
cv::merge(results, outArray);
outArray.convertTo(outArray, CV_8U);
}
- Comments(0) https://www.guivi.one/?p=5
- Share
MFC VfW
C/C++ Programming Posted on 19 Jul, 2019 16:49:05http://www.orgler.it/webcam.htm
- Comments(0) https://www.guivi.one/?p=6
- Share