compiler-errors

Errors when compiling with the Cuba library

↘锁芯ラ 提交于 2021-01-28 01:40:39
问题 I am trying to use the "Cuba" "library", which defines multidimensional integration routines, and use those in a program in C (I usually use Mathematica, but for the integrals I need to calculate now, Mathematica has huge convergence problems). I installed the elements of the package Cuba-3.1.tar.gz ("new"), and tried to compile the demo file demo-c.c, but after many many hours of trials, I still have not succeeded (I only learnt a tiny bit of C in school, but have never used it since then,

Visual Studio trying to include linux headers despite if statement

百般思念 提交于 2021-01-27 23:44:00
问题 I am attempting to create a robust header file that will compile on both windows and linux without need for changes. To this end I have an if statement in my includes that looks like #if (!defined(__WINDOWS__)) #include <sys/time.h> #include <unistd.h> #include <pthread.h> #endif I am having problems with visual studio still attempting to include these headers despite the if statement resulting in errors like error C1083: Cannot open include file: 'sys/time.h' Is there a way to resolve this

Is this a Java generic type inference compiler bug? [duplicate]

北城以北 提交于 2021-01-27 17:38:37
问题 This question already has answers here : String gets assigned to a List without a compilation error [duplicate] (1 answer) Why does this generic code compile in java 8? (3 answers) Generic return type upper bound - interface vs. class - surprisingly valid code (2 answers) Closed 1 year ago . I am thinking about constrained type inference at the call site of a function. In the following snippet I get a compile error for the first inference call in the main function as expected ( String is not

C# CS0079 Event Handling Compile Errors

随声附和 提交于 2021-01-27 15:45:54
问题 I can't compile the following code. Compile error CS0079 : The event 'CustomEvent' can only appear on the left hand side of += or -= if (CustomEvent != null) //CS0079 CustomEvent(null, null); //CS0079 How can I make this work? My implementation is like this: public delegate void EventHandler(object sender, EventArgs e); public static event EventHandler CustomEvent { add { CustomEvent += value; } remove { CustomEvent -= value; } } private static void Func() { if (CustomEvent != null) //CS0079

Unity 2019.3.0a7: Microsoft Visual C# Compiler Errors

非 Y 不嫁゛ 提交于 2021-01-27 05:31:38
问题 I've upgrade to the most recent Unity build (Unity 2019.3.0a7) and I'm getting a ton of errors, all the same, across different files. My friends who I'm collaborating with are also running the same version, but don't have the errors. There are two of them, each referencing different packages, but both referencing multiple errors inside each of the packages. The errors are along the lines of: (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights

Initializing an array of pair in C++

浪尽此生 提交于 2021-01-27 04:19:02
问题 I want to initialize an array of pair in the following way: pair<int, int> adjs[4] = {{current_node.first-1, current_node.second}, {current_node.first+1, current_node.second}, {current_node.first, current_node.second-1}, {current_node.first, current_node.second+1}}; However my compiler, Code::Blocks 12.1, keeps on throwing the error: brace-enclosed initializer used to initialize `std::pair<int, int>'| I used this method once before on an online compiler and it worked. So is it the problem

Initializing an array of pair in C++

雨燕双飞 提交于 2021-01-27 04:17:15
问题 I want to initialize an array of pair in the following way: pair<int, int> adjs[4] = {{current_node.first-1, current_node.second}, {current_node.first+1, current_node.second}, {current_node.first, current_node.second-1}, {current_node.first, current_node.second+1}}; However my compiler, Code::Blocks 12.1, keeps on throwing the error: brace-enclosed initializer used to initialize `std::pair<int, int>'| I used this method once before on an online compiler and it worked. So is it the problem

Unnecessarily replacing a task that does not exist is not supported

安稳与你 提交于 2021-01-26 03:45:30
问题 I got the following error: FAILURE: Build failed with an exception. * Where: Initialization script 'C:\Users\User\AppData\Local\Temp\Console_main__.gradle' line: 18 * What went wrong: A problem occurred configuring root project 'demo'. > Could not create task ':Console.main()'. > Unnecessarily replacing a task that does not exist is not supported. Use create() or register() directly instead. You attempted to replace a task named 'Console.main()', but there is no existing task with that name.

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

坚强是说给别人听的谎言 提交于 2021-01-22 05:09:45
问题 I'm working with Mobile App in Visual Studio 2017, but when I first created this project and tried to build it, the following error occurred: Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net

Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'

我怕爱的太早我们不能终老 提交于 2021-01-22 05:05:07
问题 I'm working with Mobile App in Visual Studio 2017, but when I first created this project and tried to build it, the following error occurred: Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'. The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net