Skip to content
Advertisement

Tag: c++

Qt creator platform codegen flags

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 $(DEFINES) Should be: CXX = g++-5 CXXFLAGS = -pipe -g -Wall -W $(DEFINES) -std=c++11 How to correctly add flags there. Answer

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 success is printed out then something probably went

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 code? I know IPPROTO_RAW

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 call returns, I’m closing my handle

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 script

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 enabled using the “OMX_CommandPortEnable” command, as

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 and without the flag, i found out that

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 application to Linux using mono? Answer On Unix/Linux

Advertisement