compiler-errors

Flutter - Dart failing after Android Studio and Flutter update

好久不见. 提交于 2020-02-24 05:42:07
问题 I had a project that was running without issues and, since I updated to Android Studio 3.5.3 and Flutter 1.13.1-pre.99 • channel master , the same project gives a huge error when trying to run on real device. I am mentioning here Android Studio and Flutter updates because I am not sur which of them (if any) is causing the problems. It looks to me like a problem with flutter_web that I installed some time ago...but still Im not sure how to uninstall flutter_web itself. NOTE: the current

gradle: Skipping task ':compileJava' as it has no source files

ぐ巨炮叔叔 提交于 2020-02-23 09:22:10
问题 i try gradle -d compileJava in my try project, and gradle raise "Skipping task ':compileJava' as it has no source files.". the worse thing is that i can't see anything created in build/. i create this project only with running gradle init and creating a "src/Ex.java". my question is: How to load default "compileJava" or define my "compileJava" to fix this warning. 回答1: By default, Java source files need to go into src/main/java (or src/test/java for test sources). Either adapt your directory

Swift override static method compile error

[亡魂溺海] 提交于 2020-02-23 08:59:39
问题 I have these two swift classes: class A { static func list(completion: (_ result:[A]?) -> Void) { completion (nil) } static func get(completion: (_ result:A?) -> Void) { completion (nil) } } class B: A { static func list(completion: (_ result:[B]?) -> Void) { completion (nil) } static func get(completion: (_ result:B?) -> Void) { completion (nil) } } Trying to compile this raise the error "overriding declaration requires an 'override' keyword" but just for the 'get' method of class B. 'list'

Adding external library (Gurobi) to Eclipse C++

十年热恋 提交于 2020-02-06 04:33:12
问题 I would like to use Gurobi in a C++ project I have in Eclipse. I tried multiple manuals/tutorials (including THIS on how to do the same in Visual Studio) to add the hook up the Gurobi files with Eclipse/GCC, but I just couldn't make it work. I feel like I don't understand enough how these things should work in the first place. In my Gurobi folder I have 3 folders, that in my opinion are important: include (with .h files), lib (with .lib files and NO .so or .a files) and src (with .cpp & .h

Why is constant initialization need for static char* but not static char**

情到浓时终转凉″ 提交于 2020-02-06 03:39:16
问题 Can someone please explain why this code... // main.c #include <stddef.h> static const int g_a = 1; static const char* g_b = "hello"; static const char* g_c[] = { "a", "b", NULL }; typedef struct Foo { int a; const char* b; const char** c; } Foo; static Foo f[] = { { g_a, g_b, g_c } }; int main( int argc, char* argv[] ) { return 0; } ...produces this error: > gcc --version && gcc -g main.c gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6) Copyright (C) 2018 Free Software Foundation, Inc. This is

Strange error when running my project

故事扮演 提交于 2020-02-05 04:54:06
问题 When trying to run my project I get this error and I don´t know what it means : _OBJC_CLASS_$_MyWindowController", referenced from: objc-class-ref in AppDelegate. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) What does it mean and how can I get rid of it? Any ideas? 回答1: Select the application target, go to the Build Phases tab and make sure MyWindowController.m is in Compile Sources , otherwise add it. Also, if

Can I override a CUDA host-and-device function with a host-only function?

蓝咒 提交于 2020-02-05 02:36:12
问题 Consider the following program: class A { __host__ __device__ void foo(); }; class B : A { __host__ void foo(); }; int main() { A a; (void) a; B b; (void) b; } This compiles (GodBolt) with nvcc 10. Yet, in more complex programs, I sometimes get the following error (line breaks for readability): whatever.hpp(88): error: execution space mismatch: overridden entity (function "C::foo") is a __host__ __device__ function, but overriding entity (function "D::foo") is a __host__ function So, nvcc is

System.Tuple defined in multiple assemblies

烂漫一生 提交于 2020-02-03 05:29:05
问题 I just installed VS 11 within Windows 8. When I got the latest of a solution built with VS 2010, then built it, I'm getting this error (in VS 11): The predefined type 'System.Tuple' is defined in multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll' I haven't been able to find an answer via Google. And I don't know what the "global alias" is. Those words are too generic to find via a

Haskell Inaccessible code bug?

北战南征 提交于 2020-02-03 05:05:06
问题 Say I have the following (erroneous) code. data A a b where APure :: (A a b) AApply :: A (A b c) c test :: (A a b) -> a -> b test (APure) a = a test AApply a = undefined GHC will then give me this error: Couldn't match type `b' with `A b1 b' `b' is a rigid type variable bound by the type signature for test :: A a b -> a -> b Inaccessible code in a pattern with constructor AApply :: forall c b. A (A b c) c, in an equation for `test' In the pattern: AApply In an equation for `test': test AApply

Angular 7 “expected 'styles' to be an array of strings”

半城伤御伤魂 提交于 2020-02-01 15:45:48
问题 I am trying to run my server and have my app.component.html load on localhost:8000. Instead, I am receiving this error compiler.js:7992 Uncaught Error: Expected 'styles' to be an array of strings. at assertArrayOfStrings (compiler.js:7992) at >CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.j>s.CompileMetadataResolver.getNonNormalizedDirectiveMetadata >>(compiler.js:17325) at >CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.j>s