Skip to content

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 insta…

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’&#82…

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_int…

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 m…