Skip to content
Advertisement

Tag: c++

My own program who work as “which” command in linux – dont work great

I would like to make my own program who will be work as which command in linux. Original which command works that (example for pwd): $ which pwd /bin/pwd but my program works that: $ ./prog1 pwd /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games pwd Can You correct my program? Source code: Answer You find the candidate directory using strsep, storing it in path. But then

Cmake Error: The following variables are used in the project, but they are set to NOTFOUND trying to compile Rigs of Rods in archlinux

I’ve been trying to compile Rigs of Rods under archlinux with 4.2.6 Kernel. I’ve followed the official compiling instructions presented in http://www.rigsofrods.com/wiki/pages/Compiling_Sources_under_Linux I have succesfully compiled ogredeps and CMake gave me no error, I even enabled multithreading for it (while using make, after running CMake .), but when I try to compile Ogre (Mentioned under the “Ogre Itself” section in

Linux Qt QSystemTrayIcon in console application

I have a working qt application. It is not a MainWindow application and has no GUI elements at all so far. It runs on startup of the linux box (as a background service). However, it has to wait for ~40-60 seconds until it can start while the IP/DHCP sorts its self out. So I wanted to give the user some

/usr/bin/ld cannot find -l

I have written a few programs and while trying to compile them using g++,as thus, I keep getting the following error: fwlib32.h is the library I am trying to include. The shared object file libfwlib32.so is present in /usr/local/lib as well as /usr/lib. But I am unable link to it. I have tried all the solutions offered by similar questions

Recreate and send packet captured by nfqueue

I capture all the packets in one side with help of nfqueue, “record” them (all the data: ip info, next protocol info etc) with nfq_get_payload and deliver them into another side with help of udp. How can I restore this packet on another side and then send to myself(2 side) like there is no udp-encapsulation between? Should I use some

Speeding up gcc compile of a single file

Running RedHat7 w/g++ version 4.8.3 w/j5 arg and o3 optimization. We currently have a file that is approx 90,000 lines long (a whole bunch of wrapper functions). The compile of this file currently takes between 30 and 40 mins. What is the best strategy to speed this build time? Would build time increase if it was split between multiple files?

MinGW DLL project compatability with linux

I’ve recently created a DLL project using the MinGW (4.8.1) compiler through the CodeBlocks IDE, and in the debugging output folder I have: my “.dll” (“AttribRdr.dll” in this case) file with an Export Definition File and finally a “.a” file (“libAttribRdr.a” in this case). According to my knowledge, the programs built for Linux/Unix based operating systems use libraries in the

Advertisement