Error following simple c++ DLL tutorial with mingw
I was following "Building and Using DLLs" tutorial from https://cygwin.com/cygwin-ug-net/dll.html. I've made mydll.cpp file:#include <iostream> void hello() { std::cout << "Hello World of...
View ArticleHow to change MacOS Default from clang to homebrew gcc
I'm having trouble finding how to change the default c++ compiler from clang to the homebrew version of gcc I have installed. The end goal here is to be able to run a command line gradle build using...
View ArticleRun a "light" preprocessor for GCC
Is there a way to run the GCC preprocessor, but only for user-defined macros?I have a few one-liners and some #ifdef, etc. conditionals, and I want to see what my code looks like when just those are...
View Articlemakefile using custom directory and library
I wrote a makefile: all: server client server: server.o des.o sha1.o /usr/local/arm-2009q1/bin/arm-none-linux-gnueabi-gcc -o server server.o des.o sha1.o -I /usr/local/include/ -lgmp client: client.o...
View ArticleCannot link TopHat against libboost_thread.a
I am trying to analyze data generated from RNA-seq experiments. I am trying to align the RNA-Seq reads to the genome using TopHat. But, I have got struck while installing the TopHat!To begin with I...
View ArticleExtract the low bit of each bool byte in a __m128i? bool array to packed bitmap
(Editor's note: this question was originally: How should one access the m128i_i8 member, or members in general, of the __m128i object?, trying to use an MSVC-specific method on GCC's definition of...
View Articlegcc : permission denied after new installion
It's a new installation on Deepin OS. I wanted to install gcc-8.3.0 on my computer.I've done this manually cause it only propose me gcc-6 with apt. So I've installed all the depedency (GMP, MPFR, MPC,...
View ArticleUnnecessary instructions generated for _mm_movemask_epi8 intrinsic in x64 mode
The intrinsic function _mm_movemask_epi8 from SSE2 is defined by Intel with the following prototype: int _mm_movemask_epi8 (__m128i a); This intrinsic function directly corresponds to the pmovmskb...
View ArticleHow to read stracktrace with CMake and Gfortran error
I'm required to install the Dune library for my "Partial Differential Equation" lecture and am stuck. I'm on a MacBook and we received an installation script (for Linux), but I always get an error that...
View ArticleHow to install libasound2-dev 32 bit without using apt-get?
I'm working on a module with microprocessor arm A7 (32 bit) that use a Debian based distro and I'm trying to use pyaudio library. Launching the script I get the following error:libportaudio.so.2:...
View ArticleUndefined symbols when trying to use native C++ .so in Mono Pinvoke
Recently I have been trying to get some Point Cloud Library functionality going in my .NET framework application, and considering that there is no completely functional wrapper for PCL for C#, I made...
View Article-I dir vs. -isystem dir
If I want to include directories to be searched for header files, which is the preferred way and why?
View Articlelibpthread.so.0: error adding symbols: DSO missing from command line
When I'm compiling openvswitch-1.5.0, I've encountered the following compile error: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-security...
View ArticleGetting the size of the type of a zero-length array element in a structure
Maybe the title is confusing, but the idea is simple. Given the following structure:struct z { uint64_t _a; uint64_t _b; struct { char _c[64]; uint64_t _d; } data[0]; } __attribute__((packed)); How...
View ArticleEclipse Artifact name variable while build steps
In eclipse I can use in C/Cpp Build->Setting ->Build artifact->Artifact name to configure the name of the binary that export in build.When I want to use this Artifact name as a variable in...
View ArticleProblem with compiling the code by terminal in linux
I have a problem with compiling the code in the terminal. As in the photo, When I compile the code, it shows the same answer
View ArticleMMX SSE extensions for for loop
I have GCC 9.2 compiler. If i use MMX or SSE/AVX extension you will have you code run in parallel, so it will be faster. How to tell the compiler to use this instructions I have a code snippet i want...
View ArticleExecuting performance gap between GCC and Clang
I have the following simple code and when I compiling them in GCC and Clang there is a huge performance difference between theirs execute times as you can see the results and the versions of the...
View ArticleWhat is the difference between -O0 ,-O1 and -g
I am wondering about the use of -O0,-O1 and -g for enabling debug symbols in a lib. Some suggest to use -O0 to enable debug symbols and some suggest to use -g.So what is the actual difference between...
View Article-static-libstdc++ works on g++ but not on pure gcc?
For the reference I'm using MinGW (GCC 5.3). When compiling a file with g++ file.cc -static-libstdc++it statically links the C++ standard lib (libstdc++) and produces a 1.9MB executable. However...
View Article