Seems Qt creator “platform codegen flags” does not take effect (Tools->Options…->Build&Run->Compillers). Mentioned there “-std=c++11” flag however it was not added to Makefile. Also added g++-5 there – also no effect: CXX = g++ CXXFLAGS = -pipe -g -Wall -W $(DE…
Tag: c++
I want to write a function that retrieves a webpage
I’m trying to write a function that returns the html code of a specified URL here’s my code so far: only the first success string is printed: success here’s my writememorycallback: the same code when embedded into the body of the main function works just fine. Answer If only the first string…
Raw Sockets in C
1. The linux manual page says about this code. In socket option, if IP_HDRINCL is set, I can make IP header. Am I right? If it’s right, above socket also let me make TCP header, too? Then, if IP_HDRINCL is not set, what means above socket? 2. what means above code comparing to number 1 question’s …
Issue in running sudo commands remotely from a c# application.
I am writing an utility in c# to get system information of remote machines. In certain Linux machines direct login to root is not allowed and some of the commands i am running require root privileges. I am able to establish SSH session (I am using Renci SSh libraries for same). Researching leads me to believe…
Redirected output from a subprocess call getting lost?
I have some Python code that goes roughly like this, using some libraries that you may or may not have: Basically, I’m starting a subprocess that’s supposed to go download some data for me and print it to standard out. I’m redirecting that data to a file, and then, as soon as the subprocess …
mmap does not work as expected (return random 0xdeadbeef)
I am writing c++ on linux7arm and the physical address is referring to a memory block (that can be accessed/changed by other peripherals) when I map a page of physical address space to the local address space and try to read it, it works fine and show the expected data BUT not all the time. if I write a scrip…
RPi2, OpenMAX, Deadlock
Environment Raspberry Pi 2 B+ Debian Linux OpenMAX IL Use-case OpenMAX Camera Video capture Camera ports are disabled Renderer / Camera Tunnel is set All components state is set to Idle Ports are enabled Problem description The first port being enabled to the Camera Input port ( Port #73 ), the port is being …
select() fails when adding m32 flag to Makefile
i have the following code, which simply creates udp socket to listen to a multicast group. I’m compiling it using gcc, with -c -g flags, on x64 machine. When adding -m32 flag to linking & compiling phases in Makefile, select() call is failing with Invalid Argument. After debugging a little bit with …
How to run DNX ‘console app’ as a background service on Linux?
I’ve implemented a DNX (dnx451) ‘console app’ which is intended to run as a background service. On Windows I would just turn it into a Windows Service. What is the proper way to do this on Linux (for instance, Ubuntu)? EDIT: Found more info here: How to migrate a .NET Windows Service applica…
Why malloc is faster than static memory allocation in my test program?
I have a test program. I get this result when executing it in ubuntu trusty 64 bit. malloc time:9571 static time:45587 Why malloc is faster than static memory allocation,or my test program is wrong? The test program is like this. Answer That benchmark is essentially meaningless because most of what it is meas…