How can I use std::maps with user-defined types as key?

I'm wondering why I can't use STL maps with user-defined classes. When I compile the code below, I get the following cryptic error message. What does it mean? Also, why is it only happening with...

How to run C code/file with MINGW?

OK, I just began learning C language, and I read a lot of people suggest to use MinGW as a compiler. I downloaded, installed it and set it correctly (I think) and set the path. everything seems to...

Why pow(10,5) = 9,999 in C++

Recently i write a block of code: const int sections = 10; for(int t= 0; t < 5; t++){ int i = pow(sections, 5- t -1); cout << i << endl; } And the result is wrong: 9999 1000 99 10 1 If i...

How do I get crtdbg.h file?

I am using MinGW GCC + Eclipse on Windows, and I have run into this error: C:\Program Files\ITG Derivatives LLC\api_clear-2.0.2.48\include/windows/csassert.h:12:20: fatal error crtdbg.h No such...

Visual Studio can't build due to rc.exe

I've searched online and couldn't find anything that resembled to my issue. I created an empty C++ project and added a main.cpp with a return and I can't get it to build. Here is the message I...

How to install rmagick gem on Windows?

How do I install rmagick gem for Windows XP? I already installed ImageMagick with the header files, and I installed RailsInstaller.org which comes with DevKit. I don't know where to look to fix...

Is this memory fragmentation? (visual studio and mingw)

I have a problem with memory fragmentation which can be summarized in this small example: #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { void *p[8000];int i,j; ...

C heap address changes between runs while other addresses persist

The heap troubles me because I don't understand who creates it, who maintains it and who decides where it should be... This test shows part of my conundrum: Source code: #include...

Hello World C++

Every time I try and run the Simple Hello World program in C++, I build it and it says nothing to build for FirstProject. The code looks correct, I'm using MinGW as my compiler, etc. Every time I...

Eclipse use make command to generate binary file

I am setting up Eclipse for embedded C development on an ARM CortexM board (STM32F4 Discovery), using Yagarto tools, OpenOCD, CDT, etc. My starting reference library is the...

thread_local vector segmentation fault at end of program in C++

I'm trying to make a multi-threaded program but am having a weird problem with thread local vectors. Here's the (stripped-down to only have the error) code: #include <vector> #include...

gcc vs clang: Meaning of -pedantic-errors

I'm using clang v3.7.0 with mingw64 5.1.0 and GCC 5.1.0, all 64-bit, on Win10. My goal is to use a set of clang and GCC options that will give me the best chance of detecting potential C89 and...

Visual Code C++ No such file or directory

Thank you for reading my question. I have just started to use Visual Code currently running version 1.4. I am using it for C++ and using mingw (g++) for compilation. I created a simple "hello...

How to setup jenkins windows slave node to support msys2 mingw shell

I want to build a program with a jenkins windows 7 node. The program is build using cmake but in the configure stage cmake tells me that there is no g++ compiler. I think this error occurs due to...

How to change/configure desired compiler in Qt creator? i.e. switch between MSVC/Mingw or g++/clang++

I am aware about how to add compiler in Qt Creator. However my Qt always chooses MSVC compiler. How to set MinGW (built-in or external) instead of MSVC? Couldn't find any post which can help a...

An error occurred while installing mysql2 (0.4.8), and Bundler cannot continue

How can I fix this error in ruby on rail. source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") ...

`require': 126: The specified module could not be found. - ../Ruby24-x64/lib/ruby/gems/2.4.0/gems/rmagick-2.16.0/lib/RMagick2.so (LoadError)

I have an existing project. I have upgraded that into Ruby24-x64, I am trying to run that but i am getting the above error. I have been trying since 2 days but no luck. I am facing the above issue...

Can I use a Code::Blocks as a MinGW GDB GUI?

We are unit testing with Vectorcast, which lets us use the MinGw GDB, but only the command line version. Some of the younger developers would like something more visual. We do not use...

Unable to configure C++, GDB, & VS Code harmoniously. Getting error message: `Debuggee TargetArchitecture not detected`

I am trying to configure the debugger on visual studio code but am failing to get it to work. I've installed MING-W64 and the c/c++ extension on visual studio code and when I run my code, here is...

Java compile in Sublime Text 3

I'm trying to compile java in Sublime text 3. I have made PATH to Java bin and made a build file, but I get this on the first compile in Sublime terminal and nothing changes after subsequent...

C compiler broken: is not able to compile a simple test program

On my Dektop and on my Surface Pro 6 CLion has stopped working and I don´t know exactly why. That is written on my Desktop: "C:\Program Files\JetBrains\CLion 2018.3.2\bin\cmake\win\bin\cmake.exe"...

Using SOIL.lib with GCC - Error adding symbols: File format not recognised

I've been recently trying to transfer my Visual Studio OpenGL project to VS Code, using GCC via mingw-x64 on Windows 10. I've been making steady progress working this all out as I am fairly new to...

internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:190: MapViewOfFileEx: Attempt to access invalid address

internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:190: MapViewOfFileEx: Attempt to access invalid address. I get this error while compiling a c++ program in sublime-text...

vscode windows: cannot open output file test.exe: Permission denied

I tried to run the basic C++ code on vscode I get as error: Error: cannot open output file test.exe: Permission denied. I am able to run Python code on VS Code but facing issue with C++ code only.

Getting the error "make: [Makefile:2: all] Error 127" when I use the make command

I am trying to install this project onto my computer and have been running into issue after issue. The roadblock I've run into now is error 127. Most of the install works fine, until it gets to...

How do I fix this error: "Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-darwin-19"], and there's no compati..."

When I run bundle install this is the response I get "Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-darwin-19"], and there's no compatible match between...

How to resolve Gemfile.lock contains merge conflicts (running `git checkout HEAD -- Gemfile.lock` does not work)

I got an error message after I ran bundle install in my ruby on rails app, the error message was: Your Gemfile.lock contains merge conflicts. Run `git checkout HEAD -- Gemfile.lock` first to get a...

#include errors detected. Please update your includePath in visual studio code

I'm trying to compile C++ files in Visual Studio Code How to use C/Cpp extension and add includepath to configurations but I'm getting this errors: #include errors detected. Please update your...

ResEdit resource editor in Windows suddenly closes its window after launch and cannot find windows.h

I have not been able to solve the problem for a week! Help me please! For several years I have been working with ResEdit on CodeBlocks in Windows without any problems at all. I suppose this...

How to compile Boost library with Visual Studio 2022 ( Preview 3)

Apparently vc143 is unsupported and i cannot seem to make the toolset commands to work with the following commands in powershell: ./bootstrap.bat gcc OR ./bootstrap.bat mingw OR ./bootstrap.bat...