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:
Tag: c++
Configuring for a compiler different than the default while running configure
I am compiling the glibc library. Before I could do that, I need to run configure. However, for compiling glibc, I need to use the gcc compiler which is not the default compiler on the machine. The manual says the following. Now my problem is that I don’t have any administrative rights on that machine. So how can I use
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:
Efficiency of gettext : in-memory translation
I have an embedded system with Flash and a very low end CPU and less RAM. I wanted to know how efficient is the gettext language translation using .MO file. For doing the locale language string fetch, do every time gettext read MO file from flash OR, the complete MO binary file is first loaded into RAM, and do the
using electric fence in a c++ program
I’ve been experimenting with Electric Fence lately and I can’t figure out how to use it with c++ code. Here’s an example: I compiled it with And I don’t see Electric Fence banner at the start and can’t find EF symbols in the executable (using nm command). But if I modify a program like so: everything is good – EF
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
Fixing file permissions after modifying in C++?
I’m saving my data in the executable file of the program. I copy it to a temporary file, overwrite a part starting at a ‘magic string’ and rename it to the original. I know this is a bad idea, but I’m doing it just for experimenting. I got everything to work so far, except for that I have to re-enable
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