Skip to content
Advertisement

Tag: c++

Hook and block globally mouse in X11

I need to hook globally mouse clicks and block last click if delay between two clicks is less than was set. I wrote it for windows using WM_MOUSE_LL hook. I was unable to find any solution for me. Is it even possible to globally block mouse click in X11 ? Windows full code Answer As far as I know the

Executing Bash commands using C code

I’m trying to use file.cpp to execute some simple bash commands. Code works for commands like ls, gedit, echo but fails at cd command. Here is my file.cpp: I execute it after compiling using ./file and my terminal output is, Current directory didn’t change to /etc. I have tried changing cd /etc to cd .., cd some_directory in file.cpp but

VTK/ITK project Requested modules not available on ubuntu

I would like to configure with cmake-gui a VTK/ITK project on ubuntu with QT and I have this error message. I don’t understand. How I can pass this error ? Answer When configuring VTK with CMake, you need to enable either vtkGUISupportQtOpenGL or VTK_Group_Qt. You can also change that setting now, then rebuild and sudo make install.

How to use get_random_bytes() in linux kernel module?

I have made simple kernel module. I printed out rand variable using seq_printf function. cb_funct function is called five times. Below is the result. random number : 66 random number : -5 random number : 135 random number : 178 random number : -42 Why negative variable is printed out? How to use get_random_bytes function in linux? Answer It makes

C++ pThread program isn’t running to completion [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 6 years ago. Improve this question I’m having an odd issue where my C++ multithreaded program doesn’t run to

compatibility issues with regex between Mac and Linux machines

Original Question: “I developed a program on my Mac using Xcode 8’s latest LLVM 8 compiler (clang 8/3.8?) which made heavy use of regular expressions out of c++14. I was then unable to get my code to give me the correct output when running on linux. There seem to be some regular expression compatibility issues that I am unaware of.

How to run windows service on Linux or Mac OS [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I have created windows service and it is working fine on Windows OS ,but we need to run this same service on Linux or Mac

Exporting functions from an executable using a def file

There is plenty of information available about how to export functions from a dll (which I’ve done many times), but I heard that it’s also possible to export functions from an executable, so that an external dll can call them. Although I’ve managed to get this working, it seems as though there’s some problem with the entry point: If it

Advertisement