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

how to access linker symbol in c code with MinGW?

I am using Mingw gcc and ld to generate an executable for windows. I would like to access the start address of a section in c code, but I have tried a lot of methods and no one works.My linker script...

View Article


Improve C Build Time on Windows (gcc 3.4.5)

I am programming on an older tech stack and I'd like to improve compile times. I've seen an application called ccache but it looks like it only runs on Unix systems. Is there any other way to improve...

View Article


How can I "register" my library libfoo.so to link it with `-lfoo`?

How can I "register" my library foo.c, compiled to libfoo.so, to link it with -lfoo? Is it by appending its path to LD_LIBRARY_PATH? Is it by running sudo ldconfig?For curiosity, who do I "register" it...

View Article

Openmp with mex in Matlab on mac

I have OS X El Capitan and Matlab R2016a and I would like to use OpenMP, which has previously worked. I have managed to install gcc-5 via homebrew and have openmp working there. I can see from this...

View Article

command 'gcc' failed with exit status 1

I tried all answers but I can't solve the problem of installing Biopython package I installed Mingw , but when I try to install the package : python setup.py install I get the following error: running...

View Article


Does the GDB examine command reverse bytes?

Does gdb reverse the order of bytes when printing out multiple word chunks (4 bytes)? If so, then why? Does this have anything to do with how programs read memory?Here is an example code to demonstrate...

View Article

Why doesn't this generate out-of-bounds access in C?

Playing around with some C code to do some comparisons between C99 and Rust, I've written the following,typedef enum { NICKLE, DIME, QUARTER, DOLLAR, } Denom; static const int cents[] = { [NICKLE] = 5,...

View Article

MySQL C Connector linking error with GCC on Windows x64

I have installed MySQL C Connector with the official MySQL installer for windows, however after linking with GCC, it still throws undefined reference errors.I tried reinstalling and installing...

View Article


Image may be NSFW.
Clik here to view.

unable to open printf, unable to read file [duplicate]

i am trying to debug a ".c" file in vs code in my ubuntu machine, but i am having this issue. Unable to open 'printf.c': Unable to read file (Error: File not found...

View Article


-fsanitize=address ,-static-libasan, could not see asan libray linked to...

As mentioned using -fsanitize=address during compilation or .so file creation will automatically link libasan.so library right ?I am facing issue :-==13640==ASan runtime does not come first in initial...

View Article

How to exclude header under current path in gcc

Suppose I have two directory product and test../test ./test/test_product.cpp ./test/foo.h ./product ./product/product.cpp ./product/product.h ./product/foo.h And product.cpp include foo.h as:#include...

View Article

how can i further understand the compilation process used by gcc?

I was trying to reverse engineer some psp programs developed using the free pspsdkhttps://sourceforge.net/projects/minpspw/I noticed that i created a function to see how MIPS handles more than 4...

View Article

Force static linking of library linked to Xcode target?

My Xcode target links against hdf5 library (using the Link Binary with Libraries build phase). libhdf5 is installed using MacPorts, thus /opt/local/lib contains both the dynamic (.dylib) and static...

View Article


GCC won't compile anything on macOS

Recently (since Catalina was released and xcode updated, but I am still running Mojave) I have found the gcc, installed via macports, has broken. I get errors saying that the system includes cannot be...

View Article

compiling C program with gcc; Cannot open output file _.exe: no such file or...

I just started trying to program in C and I've downloaded all kinds of IDE's and compilers and nothing seems to be working. Cygwin keeps giving me this error when i try to compile my...

View Article


How to correctly define and link a C++ class destructor to a main file?

This is a particularized question from mingw32/bin/ld.exe ... undefined reference to [class] ... collect2.exe: error: ld returned 1 exit statusThere is a user-defined class inside MyClass.hpp:class...

View Article

sqrtf function alternative in Visual Studio

I am writing a project in Visual Studio then I use GCC in order to compile it. Sometimes it causes some problems: This time I cannot use sqrtf function because VS accepts it however GCC does not. So I...

View Article


Undefined reference to error when .so libraries are involved while building...

I have a .so library and while building it I didn't get any undefined reference errors. But now I am building an executable using the .so file and I can see the undefined reference errors during the...

View Article

Image may be NSFW.
Clik here to view.

Why endbr64 Instruction is always executed? [duplicate]

I start to learn assembly language.When I disassembled C code, endbr64 Instruction always execute.I don't understand why this Instruction is executed.I want to know why endbr64 is executed.Here is...

View Article

C program using net-snmp does not compile

I have installed net-snmp 5.8 on a Ubuntu 16.0.4 machine and then I have checked the correct installation:snmpget --versionNET-SNMP version: 5.8Next, I am trying to write and compile my first SNMP C...

View Article
Browsing all 22024 articles
Browse latest View live


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