Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 22148 articles
Browse latest View live

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 Article


How 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 Article


How 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 Article

meta-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 Article

Print 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 Article


C 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 Article

clang / 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 Article

c99 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 Article


Generating 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 Article


CMake 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 Article

Unity 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 Article

How 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 Article

GCC: 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 Article


why ((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 Article

How 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 Article


VS2017 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 Article

What 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 Article


Is 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 Article

Cause 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 Article

Why 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
Browsing all 22148 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>