Category : compiler-errors

I’m having trouble linking my C++ program with ROOT. I’m using MacOS and g++ compiler. This is my compiling command: g++ -std=c++11 main/main.C src/lib1.C -I ./src/ -I /opt/homebrew/Cellar/root/6.24.04_1/include/root/ -o ex And this is the error I got: Undefined symbols for architecture arm64: "TVersionCheck::TVersionCheck(int)", referenced from: ___cxx_global_var_init in prog-ddbd52.o ld: symbol(s) not found for architecture arm64 ..

Read more

I’m using the following CMakeLists.txt to generate the Makefile to compile a library I’m writing: cmake_minimum_required(VERSION 3.10) # set the project name and version project(PCA VERSION 0.1 DESCRIPTION "framework for building Cellular Automata" LANGUAGES CXX) # specify the C++ standard set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) find_package(OpenMP REQUIRED) # compile options if (MSVC) # warning level 4 ..

Read more

I encountered a problem while trying to compile this code in main.cpp file: #include "library1.h" #include "BinaryTree.h" #include <stdio.h> #include <stdlib.h> #include <memory> using namespace mivne; using ::std::cout; using ::std::cin; using mivne::binaryTree; using namespace std; int main () { binaryTree<int> bTree1 = binaryTree<int>(3); binaryTree<int> bTree2 = binaryTree<int>(5); bTree1.addLeftSubtree(bTree2); bTree1.removeLeftSubtree(); bTree1.inorderTraverse(&print); return 0; } I got ..

Read more

I am not able to include powerbase.h file in the c application, because this file is not available under the mingw include path – "C:ProgramDatachocolateylibmingwtoolsinstallmingw64x86_64-w64-mingw32include". However, the powerbase.h file is present in the "C:Program Files (x86)Windows KitsInclude.0.19041.0um" path. I want to detect the windows resume events in the c application, I believe I need to ..

Read more