"Multiple definition of" C++ compiler error

I can't seem to get rid of these seemingly random compiles errors in one of my classes. I get about 4 errors such as: multiple definition of `draw_line(float, float, float, float)' and multiple...

RC5 Decrypt/Encrypt for Conquer game client

RC5.h #ifndef RC5_H #define RC5_H #define RC5_32 32 #define RC5_12 12 #define RC5_SUB (RC5_12*2 + 2) #define RC5_16 16 #define RC5_KEY (RC5_16/4) const unsigned long RC5_PW32 =...

why is `std::initializer_list` often passed by value?

In almost every post I see on SO, involving a std::initializer_list, people tend to pass a std::initializer_list by value. According to this...

Passing by Value and copy elision optimization

I came upon https://web.archive.org/web/20120707045924/cpp-next.com/archive/2009/08/want-speed-pass-by-value/ Author's Advice: Don’t copy your function arguments. Instead, pass them by value...

'string'/'cin' was not declared in this scope

I'm working on an assignment where I have to split up a program into modules of .cpp and .h files, and I'm getting a weird error. In one of my .cpp files, I have the code #include...

Makefile dealing with different source and object directories under Windows and Linux

I have a problem creating a Makefile for a project with source files scattered in different folders. As the source files might have the same names, I'd like to send the objects into different...

Why do I have to "git push --set-upstream origin <branch>"?

I created a local branch for testing Solaris and Sun Studio. I then pushed the branch upstream. After committing a change and attempting to push the changes: $ git commit blake2.cpp -m "Add...

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...

'QML Connections: Cannot assign to non-existent Property' despite the opposite being true

So, I checked the following questions, which seemed most similar to my existing...

Can't compile c++ program with OpenCV. OpenCVConfig.cmake file missing

Tried to run my simple cpp program from CLion and also from terminal, but everywhere have the same problem: By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake...

How do I convert Wifi.localIP() to String and store it to external variable

I am trying to store the ip address into an extern string. My ip address value is in .cpp but then I want to store it in my .h file. I am storing it as string since I want to make it as a link....

Android Studio: This file not part of the project, but the project builds successfully

I have a strange problem that suddenly appeared in android studio. I created a new cpp file, and included it in Android.mk. Then I synced the project. However, android studio still complains that...

undefined reference to YAML::Load

yaml-cpp is throwing a common error upon compiling a simple cpp file. I've tried the solutions presented in this and this SO post but neither of them work. My cmake command: CC=$(which gcc)...

AndroidStudio compiling native code shows "fcntl(): Bad file descriptor"

I have a legacy app that a fellow developer was seeing fcntl(): Bad file descriptor when building our native cpp code within AndroidStudio. Our build environment supports building from the command...

Put the webcam data to kinesis video stream

Im very new to Api and our use case is to stream the live data from webcam to kinesis video stream (kvs). Steps Taken : Created the ubuntu server on aws and installed the CPP SDK. created the...

Maven is not using Java 11 - Fatal error compiling: invalid target release: 11

I am trying to compile my project with Java 11. When I try to run the application with Java 8 as the Java version in pom.xml, it works fine. But when I try to run it with Java 11, it throws an...

Jupyter Notebook installation error - Building wheel for argon2-cffi (PEP 517) ... error

Building wheels for collected packages: argon2-cffi Building wheel for argon2-cffi (PEP 517) ... error ERROR: Command errored out with exit status 1: command:...

Python Can't install packages

I'm trying to install a package on Python, but Python is throwing an error on installing packages. I'm getting an error every time I tried to install pip install google-search-api. Here is the...

Quad-precision numbers with Intel Compiler (icc)

I have been trying to work with Intel's Quad-precision floats. I have the following code, and it is returning unexpected results. #include <stdio.h> #include <math.h> int print(const char *label,...

Flutter: IOS Could not build the precompiled application for the device 2021

Launching lib/main_dev.dart on Kingman’s iPhone in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: FK3FA23S5A Running Xcode...

Why does my WSL in vscode terminate with exit code "4294967295"

I am accustomed to using WSL in my vscode to code with cpp. Today I configured Go in my vscode and run it successfully in powershell cmd. However, when I transfer to WSL, it was terminated with...

error: Microsoft Visual C++ 14.0 or greater is required

While installing python package I get the following error even though I have latest Microsoft Visual Studio BuildTools installed. error: Microsoft Visual C++ 14.0 or greater is required. Get it...

need help on installing eth-brownie on windows 10

While installing eth-brownie via "pip install eth-brownie" on vscode terminal, I am getting the error below: I already chose the default terminal CMD I already tried installing the required VS...

#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...

How to install libs for R arrow package on ubuntu without internet?

I am working on Azure databricks and it's compute server is Ubuntu 18.04. I want to install arrow R package but without internet access because of security reasons. I downloaded arrow tar file on...

Qt Creator C++ error: No documents matching "ui_mainwindow.h" could be found

I'm currently using Qt Creator 4.15.2. I tried creating a new project in the creator, the .h, .cpp, and .ui files are perfectly linked. If I changed anything in the creator, everything is...

Can't install Python 3.10.0 with pyenv on MacOS

Trying to install Python 3.10.0 on MacOS 11.6 (Intel) with pyenv 2.1.0 (from homebrew) fails with: python-build: use [email protected] from homebrew python-build: use readline from homebrew Downloading...

python 3.10.0 Building wheel for mysqlclient (setup.py) ... error

I installed python latest version python3.10.0 and django version 3.2.8. I tried to install mysqlclient by using pip install mysqlclientcommand in the command prompt but it shows an error like...

Defeating the time complexity of Python Dictionary

I have a Python dictionary whose keys are Strings consisting of lower-case English alphabets and values are ints. Moreover, there are exactly 5e6 unique keys, all of them are Strings with lengths...

In C or C++, does the compiler do implicit linking?

How does some std-lib, external-libs or any other pre-compiled src code such as the well-known header file <iostream> with its corresponding object file or static/dll lib get linked into my own...