Solaris ld: fatal: unrecognized option '--'
I am trying to compile Apache Qpid on a Solaris machine, but it failes during linking:Scanning dependencies of target qpidtypes[ 0%] Building CXX object...
View ArticleHow do I solve Makefile unkown argument error?
Can anyone please suggest the nature of this error when I call command "make"? This work perfectly fine in the morning without doing anything.C02QM3FSFVH3:ass1 kwunkeilau$ makegcc -Wall -werror -g -c...
View ArticleHow to add gcc include directory to existing Makefile
I have a Makefile that I have copied and use in many small programs that I write in C for Linux. Sadly, I don't understand every detail of how it works and I typically just comment out the name of the...
View Articlemeta-toolchain-qt5 on yocto zeus, gcc-cross-canatian-aarch64 fail
I'm trying to cross compile C++ application during yocto image building. I'm working on yocto zeus with meta-tegra and machine is Jetson Nano.At the beginning I've tried to just add inherit...
View ArticlePrint all inherited class member variables and methods
Suppose I have inheritance like below:class A{public:A(){}int s;void Show(){}};class B : public A{public:B(){}int y;void MyShow() {}};int main(){B b;}Is there a way that I can know by any mechanism...
View ArticleC Hello world: Code Blocks IDE, MinGW C compiler on windows
I can't get Code Blocks IDE to compile the hello world C program it creates when you create a new C project. I've installed MinGW and it was recognised by the IDE. But when I try to build I get the...
View Articleclang / gcc on MacOS: Error Expected Filename [closed]
I've just got clang running on my Mac 10.14.6, trying to run a simple HelloWorld program but I'm struggling to import/include the function library... See code below. Any help much appreciated - mega...
View Articlec99 goto past initialization
While debugging a crash, I came across this issue in some code:int func(){ char *p1 = malloc(...); if (p1 == NULL) goto err_exit; char *p2 = malloc(...); if (p2 == NULL) goto err_exit; ...err_exit:...
View ArticleGenerating test coverage of C++ static library as called by separate test...
I am using QT Creator to work on a medium-sized project in C++.The project structure basically looks like thisProjectGroup ALibrary A1Group BLibrary B1Library...
View ArticleCMake reports broken g++ and missing libiconv-2.dll
I have some strange problem with CMake when I press Configure button. It reports me all the time that libiconv-2.dll is missing and fails to finish operation. However, this library is present in...
View ArticleUnity Framework Unit Testing undefined reference to "setUp" and "tearDown"
I copied the simplest code from the Unity for C Unit Testing library and set up a very basic test, which I copied and pasted from the site:#include "unity/src/unity.h"int main(void){ UNITY_BEGIN(); int...
View ArticleHow does the -l gcc flag search directories?
Some context: I am writing a c program, let's call it example.c, the relies heavily on a library called lib.h and its corresponding c implementation. I am operating on a Mac with Mojave and Ubuntu 17....
View ArticleGCC: cannot find iostream compilation error
First thing is that I don't know much about programming at all. I got some C code off of a site that isn't working; when I attempt to compile this keylogger:#include <iostream>#include...
View Articlewhy ((size_t) &((TYPE *)0)->MEMBER) is not considered as constexpr since g++7.4
following code can be compiled successfully in g++7.3#include <iostream>struct IMsg{ int i; int j;};int func(){ constexpr size_t offset = ((size_t)&(((IMsg*)0)->j)); std::cout <<...
View ArticleHow to eliminate the Eigen compiling errors/warnings about convertion?
I'm in a project which has a strict code style requirement. And the -Werror=convertion compiling option is mandatory.When I use the library Eigen, it seems even the basic matrix muliplication will...
View ArticleVS2017 Cross platform project does not set C++17 as language standard
Am using VS 2017 to develop a cross platform application. Target system has GCC v 8+ installed on it, which, according to documentation, supports C++ 17.For some reason though, the c++ language...
View ArticleWhat exactly is LLVM?
I keep hearing about LLVM all the time. It's in Perl, then it's in Haskell, then someone uses it in some other language? What is it?What exactly distinguishes it from GCC (perspectives = safety etc.)?
View ArticleIs it possible to use a derived class virtual method from a base class...
I have multiple derived classes which extends the same Base class. They have the same properties, with the exception of a single method that might have different arguments and body. How can I have a...
View ArticleCause and remedy for gcc linker error on export of dll
Windows C utility program (Pname.c) being compiled and linked as a dll. I am doing this on Windows 10 using CodeBlocks and Mingw/gcc. The link step produces 1 error as follows:Cannot export...
View ArticleWhy does passing char** as const char** generate a warning?
I've been getting this warning:note: expected ‘const char **’ but argument is of type ‘char **’For now, I'm passing the arguments by casting them to const char **. Is there any other way I can get rid...
View Article