Skip to content
Advertisement

Tag: c++

MSVS2015 Linux Debug starting gdbserver failed

I’m trying to debug a linux c++ application on a remote offsite server and I got this message: Any ideas? I’ve tried debugging it on an onsite linux machine (through MSVS2015 on windows) and it works fine. Answer I had a snapshot of the server prior to installing gdbserver. It worked after I installed all the components again by doing

VS2017 Linux C++ threads issue

I have been testing the VS2017 Linux C++ with remote debugger on Linux Ubuntu. I have created a few example projects for C++ and everything has been working great until I got to threading examples. I cannot seem to get the threads to compile as I keep getting “undefined reference to `pthread_create'” error. I know the solution to this is

make using autotools gives undefined reference errors while custom Makefile works fine

I’m trying to convert the build mechanism of ccextractor (Open source closed caption extractor) from custom Makefile to Autotools generated Makefile. Current Makefile looks like this: Building through above Makefile works fine. My Makefile.am looks like this: If I run make after autoreconf -i on above file, build fails with error: If I run ./configure as ./configure LIBS=”-lm -lz” build

Because one line of unrelated code, the speed difference so much

Why use the precompiler to add a line of code, the speed change is so great? ubuntu@host:~/test_intersection$ g++ -std=c++11 -O3 -DLINUX main1.cpp -o main1 ubuntu@host:~/test_intersection$ ./main1 duration: 62080 microseconds,set a size: 2998917 set b size: 3000000 set result size: 2087 ubuntu@host:~/test_intersection$ g++ -std=c++11 -O3 -DLINUX -DTEST main1.cpp -o main1 ubuntu@host:~/test_intersection$ ./main1 duration: 362546 microseconds,set a size: 2998985 set b size:

Using gnu make with a makefile, why is my .o file not deleted?

I have a simple makefile that works correctly with gnu make, except the object file named ‘txt.o’ is not removed, using ‘rm tst.o’. Here is the text from the makefile. Anyone know why the rm command here is not removing the ‘tst.o’ file? Thanks, Matt Answer What command did you enter for the make? If you just enter make, it

GDB doesn’t recognize some C functions

So I’m new to Linux and just got Ubuntu 16.04.2 running on a VM. I’ve installed gcc/g++ on here in the terminal, but when I run my program in GDB, as soon as I get to a strcmp function, this pops up for many lines. And when I go further down: So I’m guessing it just doesn’t recognize my C

Advertisement