GNU compiler for node-gyp - node-gyp

Somebody has experience build node module with gnu compiler under windows? I have module which requires gnu compiler. I include minGW source in module. But I have problem with gcc. It's possible tell node-gyp "use gnu compiler"?

Related

memmem() in Mingw-w64 gcc

I'm trying to build a C program with Windows gcc using Mingw-w64 installation (gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0).
I get undefined reference to `memmem' error. Isn't memmem() a standard glibc function that should be available in all gcc versions?
As this post explains
"MinGW does not build against glibc, it builds against msvcrt. As
such, it uses libmsvcrtXX.a instead." "gcc and glibc are two separate
products."
So, yep, no memmem on Windows and here's the implementation.

I'm using GNU GCC compiler but code::blocks asking for Cygwin GCC compiler

I have installed the code:: blocks from the site where it uses Cygwin compiler.
I have set the GNU compiler as default after installing.
But I'm getting the following error:
**The compiler's setup (Cygwin GCC) is invalid, so Code:: Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?!
Do you have a compiler installed?
Goto "Settings->Compiler...->Global compiler settings->Cygwin GCC->Toolchain executables" and fix the compiler's setup.
Tried to run compiler executable 'C:\Cygwin/bin/gcc.exe', but failed!
**
I have tried the above steps but I'm getting the same error again.

Is not only gcc itself installation enough to build c language in my windows machine?

I'm not sure what the meaning of installing a compiler(say, gcc) is.
I have an windows machine and will install cygwin.
cygwin has many packages and i installed gcc-related-packages.
But wait, gcc is just a compiler and is not including header files such as stdio.h, stdlib.h, etc.
What compiler does is just finding a header file specified in a some source file.
Installing compiler means (implicitly) installing related header files?
The Cygwin installer knows about package dependencies, and installing gcc will pull in the minimum set of packages needed to compile C programs. However, if you need particular libraries beyond the basic C library, you will have to install them separately.

How to force Eclipse CDT MinGW toolchain to use mingw32-g++.exe?

I am using Eclipse CDT and MinGW to do C development on Windows 8.1.
I have unpacked company internal MinGW package and just copied it to c:\MinGW, so it was not installer. I also added c:\MinGW\bin to path.
When I run Eclipse CDT, it does detect MinGW toolchain. However, after I set up a C project and tell it to use MinGW toolchain, and build it, I see in the console output the C compiler used is gcc, and I would like to use mingw32-g++.exe.
How do I define this in Eclipse CDT?
I checked project Properties\C C++ Build\Tool Chain Editor\ and under used tools I see the following:
GCC Assembler
GCC Archiver
GCC C++ Compiler
GCC C Compiler
MinGW C Linker
MinGW C++ Linker
The compiler is defined under project properties \C C++ Build\Settings\Tool Settings. Here one should select GCC Compiler and specify mingw32-g++ or just g++, or whichever compiler is desired.

Which GLIBC version is using my toolchain?

I know how to check the GNU C Library on my x86 workstation, but now I would like to know which GLIBC version is using my cross toolchain for ARM (I didn't build the toolchain). I cant test the libc.so.6 file of my toolchain's $PATH library in my x86 workstation.
Is there some way to know the glibc version without compile a test program and testing in my embedded system? Furthermore, how can I know which PATH library is using by default the GNU linker of my toolchain?
You can use ldd --version command to check version, like in GLIBC version.
You should call ldd from your toolchain:
/full/path/to/your/toolchain/lib/usr/bin/ldd --version.

Resources