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

Linux static linking is dead?

In fact, -static gcc flag on Linux doesn't work now. Let me cite from the GNU libc FAQ:2.22. Even statically linked programs need some shared libraries which is not acceptable for me. What can I...

View Article


make dependencies: skip vendor and package headers with gcc?

I'm starting a new project and thinking of using gcc 6.3.1 -MM to generate the dependencies into a file called Make.Dep, that I'll include from Makefile.The -M option outputs all headers, including...

View Article


I have installed gcc home brew command line tools on OS Catalina. How to run?

I have installed version 9.2.0 of gcc from the homebrew package on OS X Catalina 10.15.3I am trying to run the C11 language on XCode as it is part of my C language coding class. The C99 language...

View Article

Using gtest with gcc cpp, got error - collect2: error: ld returned 1 exit status

Source code:#include <stdio.h> #include <gtest/gtest.h> int main() { return 0; } Error message:happyjoo@D:~$ gcc test.cpp /tmp/cctruZ9h.o: In function...

View Article

undefined reference to `pow@GLIBC_2.29'

Building exe ... /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: /data/MASTER/devm/sisp/test/RELEASE/x86_64-suse12sp4-gcc.4.8.5/lib/libsoft.so: undefined reference to...

View Article


Does gcc support multithreading

I have created a new thread in my program with CreaThread() function which is present in windows.h and I compiled with with this command gcc myprogram.c but when i started my program it seem that the...

View Article

gcc cannot find the static library installed in /usr/local/lib

I have built and installed my library according to the following cmake:install( TARGETS ${LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} )...

View Article

What does this GCC error "... relocation truncated to fit..." mean?

I am programming the host side of a host-accelerator system. The host runs on the PC under Ubuntu Linux and communicates with the embedded hardware via a USB connection. The communication is performed...

View Article


Image may be NSFW.
Clik here to view.

Error: 'g++' could not be spawned. Is it installed and on your path?

While trying to run c++ in Atom editor.I installed 'gpp compiler' in Atom Editor File==>Settings==>Packages==>'gpp-compiler' I also installed gcc-core-9.2.0-1-mingw32-bin and provided it's...

View Article


Cannot link an application with libavcodec

I'm trying to make a simplest app with usage of ffmpeg libs. Here is my code:main.c:#include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libswscale/swscale.h>...

View Article

Poco - Killing process tree C++

my code need to run in windows and linux. I'm using Poco library for it. Poco::Process::kill() only kill the process without it's childs. (If the process opened another process) For example I'm running...

View Article

Why number of created thread is less than thread-max?

With this code:void yield_sleep(void) { using namespace std::chrono; static size_t thread_num; auto start{high_resolution_clock::now()}; std::this_thread::yield(); auto...

View Article

Executable without dynamic linkker

Can I compile (using g++ compiler) an executable (on linux) and strip out the dynamic linker /lib64/ld-linux-x86-64.so.2 ? I mean that if I ldd the executable after building it should detect the linker...

View Article


Image may be NSFW.
Clik here to view.

Different output with different optimization levels in GCC

I am working on a rewrite of a raytracer that I developed for university last semester and I am running into the following problem: When I compile and run my code in Debug the output is as expectedBut...

View Article

What is a GCC toolchain?

In which ways it can be an example of C/assembly/object/executable compiler?I would like more pieces of information than the few ones Wikipedia gives about it. Also, if you can link some sources where...

View Article


How to include *project root* headers compiling with GCC C++ compiler?

How to include headers located in project root compiling with GCC C++ compiler? I want to tell GCC compiler to search for some header files in project root. I do NOT want to make changes in code and...

View Article

How to use a static member-struct in multiple source files? [closed]

I need to use a struct, that is a static member of my class, in multiple source files. Here's a trimmed down example:Header Filenamespace NS { class Foo { public: static struct Bar { bool test = false;...

View Article


Linux multithread(Pthread-C++) adding 0~99 has different result with/without...

I used 10 Pthreads to add up 0~9,10~19,20~29,30~39,40~49,50~59,60~69,70~79,80~89,90~99 and for(i=0;i<10;i++) { temp=i; temp+=1; temp*=10; point_i=&temp;...

View Article

How to compile a c file with multiple words name

Help! I very very new to programming and mostly self taught (using command prompt) I tried to compile a c file that has multiple words as its name and it showed error for all the...

View Article

What kind of syntax is platform.txt from Adafruit_nRF52_Arduino

If someone would please tell me what kind of syntax the following file is?https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/platform.txtname=Adafruit nRF52 Boards version=0.19.0 # Compile...

View Article
Browsing all 21994 articles
Browse latest View live


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