Skip to content
Advertisement

Tag: c++

‘”SDL.h” no such file or directory found’ when compiling

Here’s a piece of my current Makefile: I have libsdl installed properly, SDL.h is in /usr/include/sdl where it belongs, but it just won’t compile. I also have the line #include “SDL.h” in my .h files, but still no go. Anyone knows why? Answer If the header file is /usr/include/sdl/SDL.h and your code has: You need to either fix your code:

Replace of XKeycodeToKeysym

When I try to build my code with the X11 headers in Ubuntu 12.04 What is the expected result? Compiles. What happens instead? As a result of https://bugs.freedesktop.org/show_bug.cgi?id=5349 XKeycodeToKeysym is now properly marked as being deprecated. How to fix my code for warning free and correct build? Thanks Answer Provided XKB is available then the simplest replacement for XKeycodeToKeysym is:

What are the disadvantages of Linux’s message queues?

I am working on a message queue used to communication among process on embedded Linux. I am wondering why I’m not using the message queues provided by Linux as following: msgctl, msgget msgrcv, msgsnd. instead of creating shared memory, and sync up with semaphore? What’s the disadvantage of using this set of functions directly on a business embedded product? Answer

Where is PATH_MAX defined in Linux?

Which header file should I invoke with #include to be able to use PATH_MAX as an int for sizing a string? I want to be able to declare: But when I do so my compiler (Clang/LLVM on Linux) issues the following error: I tried doing a google search but still no luck. #include <limits.h> Does NOT fix the problem/error. Am

C strip html between

How can i strip the HTML from document between and including the <…> tags in a HTML document using C? My current program uses curl to get the contents of the webpage and puts it into a text file, it then reads from the text file and removes the <>, but i am unsure of how to remove everything between

Run Another Program in Linux from a C++ Program

Okay so my question is this. Say I have a simple C++ code: Now say I have this program that I would like to run in my program, call it prog. Running this in the terminal could be done by: Is there a way to just do this from my simple C++ program? For instance Any feedback would be very

Advertisement