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

Custom handling of memory reads and writes in C

I am working on writing my own malloc and using the LD_PRELOAD trick to use it. I need to be able to perform custom functionality for every memory access to the heap, both reads and writes (performance...

View Article


implicit declaration of function ‘_beginthread’ when call go library from c code

i want to call go method in c code os is windows10 i use Cygwin64 Terminalmain.gopackage main import "C" func main() {} //export number_add_mod func number_add_mod(a, b, mod C.int) C.int { return (a +...

View Article


getting error: expected declaration specifiers or '...' before string constant

I am trying to create a log function that will take the log type, msg and will add file name, function name, line from where the log function was called. I have created the following test code but...

View Article

GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

Apologies, I understand questions very similar to this have been asked relatively often, although none of the solutions seem to work for me.When attempting to run any c++ code of a reasonable...

View Article

GCC DLL forwarded export using full file path

I'm trying to create a DLL forwarded export that specifies a absolute path. I've confirmed that doing so without a path works:asm (".section .drectve"); asm (".ascii \"...

View Article


Clang vs GCC for my Linux Development project

I'm in college, and for a project we're using C. We've explored GCC and Clang, and Clang appears to be much more user friendly than GCC. As a result, I'm wondering what the advantages or disadvantages...

View Article

Compiling C and C++ files together using GCC

I'm trying to compile C and C++ sources together using GCC.gcc -std=c++0x test.cpp -std=c99 test.c -lstdc++Now, this works fine, except that I get two warnings.cc1plus: warning: command line option...

View Article

How to use the __attribute__((visibility("default")))?

Reading Visibility in the GNU wiki, it is clear. Taking this example from C++ Tutorials// classes example #include <iostream> using namespace std; class Rectangle { int width, height; public:...

View Article


Can't compile the TL-WR841NV14(US) firmware

I've a TL-WR841NV14(US) router.So, I've downloaded the GPL code from there official website. And then I've tried to compile the the firmware as they told in the README file.But it didn't worked at...

View Article


Can I use Preprocessor Directives in .ld file

Can I use Preprocessor Directives in .ld file? I need to to use one of two sets of .ld file and wants to let Build engine deside that using macro, Can I do that?

View Article

Compile error: "g++: error trying to exec 'cc1plus': execvp: No such file or...

When I compile C/C++ program with popen in php... I got this error:g++: error trying to exec 'cc1plus': execvp: No such file or directory but if I run php code in shell.. it works fine..in Arch...

View Article

CUDA incompatible with my gcc version

I have troubles compiling some of the examples shipped with CUDA SDK. I have installed the developers driver (version 270.41.19) and the CUDA toolkit, then finally the SDK (both the 4.0.17...

View Article

How to resolve GCC syntax error when installing using pip?

I am trying to install pyq for Python using pip. However, it fails during the build process on the following command:C:\FAST\anacondaforPython3.5.2\4.1.1\Scripts\gcc.bat -shared -s...

View Article


I can install python package successfully but can not import it. Symbol not...

I successfully installed pysurvival using homebrew, pip, and gcc, but when I try to import pysurvival into jupyter notebook as so:import pysurvival from pysurvival.models.simulations import...

View Article

gcc compile error: cast specifies array type

The following code is perfect valid,int *ia = (int[]){1,3,5,7}; but when I compile the next line of code,char *p = (char[]) "abc"; gcc saystest.c:87: error: cast specifies array type It seems they are...

View Article


Debug vs Release in CMake

In a GCC compiled project,How do I run CMake for each target type (debug/release)?How do I specify debug and release C/C++ flags using CMake?How do I express that the main executable will be compiled...

View Article

Allocating through a pointer to a pointer parameter

I have this macro: /* * int callocs(type **ptr, size_t nmemb); * * Safe & simple wrapper for `calloc()`. * * PARAMETERS: * ptr: Memory will be allocated, and a pointer to it will be stored * in...

View Article


How to pack Boolean operations using gcc or other compilers?

Intel CPUs are capable of performing 512 or 1024 bitwise operations using vectorized operations. Assume I have a (pseudo)code that looks like this:w0 = i0 & i1 w1 = i1 & i2 w2 = i0 & i3 w3...

View Article

Where is the source code of gcc builtins?

gcc provides numerous builtin routines. Where can I find the source code of the builtin routines? I understand that sometimes they might be direct opcodes. This was shown e.g. in Implementation of...

View Article

Disable assembler warning ".section...

When using MacPorts GCC on OS X and enlisting the Clang Integrated Assembler via -Wa,-q, the assembler produces a stream of warnings for each file. A sampling of the warnings is shown below (so many of...

View Article
Browsing all 22016 articles
Browse latest View live


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