FAQ Database Discussion Community

Argument Type Problems

casting,compiler-errors,fortran
Why am I getting the following error d = Atan ( 1_Real32 / 110443_Real32 ) 1 Error: 'x' argument of 'atan' intrinsic at (1) must be REAL or COMPLEX The funny thing is that I get no problems when I use d = Atan ( Real(1,Real32) / Real(110443,Real32) ) ...

App crashing after pushing button, but the action is working

android,button,android-studio,compiler-errors
Maybe someone sees an error, the problem is that when i push btn2 (button 2) and btn3 (button 3) app crashes, but action still works, i.e video is running and PDF opens, while button 1 is working correctly... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); configureImageButton(); mCamera = getCameraInstance();...

The type 'System.Runtime.InteropServices.SafeHandle' exists in both 'System.Runtime.InteropServices.dll' and 'System.Runtime.Handles.dll'

c#,dll,reference,compiler-errors,interop

Why array indexing not showing commutative behavior in this program?

c++,arrays,templates,compiler-errors
I know that array indexing is commutative in both C & C++, so a[i] is same as i[a] and it would have same effect as i[a] and both are valid. But recently I wrote a following program that fails to compile when I use i[intob] instead of intob[i]. #include <iostream>...

unrecognized debugging option: 1 [enabled by default]

c,gcc,compiler-errors,makefile,cross-platform
I am writing a cross-platform gtk application for Windows and linux in C. Today I came across the strange compiler error in the title (which I have never seen before). This happens when I build my program in Windows, but not in Linux. When I build it in Windows via...

C++ template class compilation error message: error: expected a qualified name after 'typename'

c++,templates,compiler-errors,llvm,em++
I am trying to compile code from https://github.com/Sami-Vuorela/aatc I am compiling using LLVMs em++ compiler: em++: version 1.3.2 clang: vesion 3.6.0 Here is the console error message: /opt/emsdk_portable/emscripten/master/em++ -Qunused-arguments -U__STRICT_ANSI__ -Wall -fno-strict-aliasing -std=c++11 -DAS_WRITE_OPS=0 -DAS_USE_STLNAMES=1 -DAS_USE_FLOAT=0 -Iinclude/ -Iangelscript/sdk/angelscript/include/ -Iangelscript/sdk/add_on/scriptbuilder/ -Iangelscript/sdk/add_on/contextmgr/ -Iangelscript/sdk/add_on/scripthelper/...

Multiple definition and file management

c,arrays,compilation,compiler-errors,include
I'm writing a program for vocabulary training, for myself. And the program itself should be available in different languages, atm in German and English. What I want is to have a Main File which manage all and two separate files for the functions in the right language. I compile all...

Could not find member in Swift (multiple instances)

ios,swift,compiler-errors
I am trying to build my Xcode project however, I keep getting "Could not find member " build errors in three different instances from the code below. Please help. Instances: Could not find member 'dataSource' self.pageViewController.dataSource = self 2&3. Could not find member 'Forward' self.pageViewController.setViewControllers(viewControllers, direction: .Forward, animated: true, completion:...

LINQ to Entities does not recognize the method 'System.String ToString(Int32)'

c#,.net,linq,entity-framework,compiler-errors
Hi I am using a linq query which is throwing the error LINQ to Entities does not recognize the method 'System.String ToString(Int32)' method, and this method cannot be translated into a store expression. List<string> resultMap = (from item in mapResult select Convert.ToString(item.ResultDE)).ToList(); Error is throwing in this below statement List<Result_DE>...

Implementing swift equatable protocol gives me bad access error. why?

ios,swift,compiler-errors,protocols
here is my code. it seems that when i subclass UIColor to make it equatable i get a memory error. why is that? class MyColor: UIColor, Equatable { var name: String init(name: String, r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat = 1.0) { self.name = name super.init(red: r, green:...

C# - Not being able to use list.Count() in this scenario

c#,list,count,compiler-errors,protection
I've been getting this error during compile: System.Collections.Generic.List<string>.Count is inaccessible due to its protection level about trying to use the method Count() on a list I created that represents an inventory in my project. The list itself is public so I can't get my head around as to why this...

split an equation with multicols on

compiler-errors,latex,equation,multicol
I would like to split my large equation in two column. But my file fails to compile when I try to use \{amsmath} and then split, multline, etc... The error says: Package amsmath Error: \begin{multline} allowed only in paragraph mode. \begin{multline} Does someone knows how to split a large equation...

os kern error : “ld: symbol(s) not found for architecture x86_64”

c++,architecture,compiler-errors,x86-64,clang++
I have looked all over Stack Overflow and other websites about this famous error, and all of them are very specific, and in my case I cannot find a solution. I am making an ncurses application and when i try to compile it, it causes the following error: Undefined symbols...

Android findViewById(), getComponentName() and getSystemService(): Cannot make a static reference to a nonstatic field from type Activity

java,android,android-activity,compiler-errors
In the following class, I am getting the following three compiler errors in the enableAssistedSearch method. Cannot make a static reference to the non-static method getSystemService(String) from the type Activity Cannot make a static reference to the non-static method getComponentName() from the type Activity Cannot make a static reference to...

Class Array usage generates the error “NullReferenceException: Object reference not set to an instance of an object”

c#,arrays,class,compiler-errors
I am currently working on a server system for a game called Reign of Kings. I am using hooks and commands given by the Oxide developers to make my server system. Back in the PAWN Language, we could do something like enumeration of player data inside an array, which converts...

Compilation error when typedef an std::array

c++,arrays,compiler-errors,stdarray
I define a type called inputTy using std::array (c++11) , the dimension of the array declared as an external constant integer d. namespace project { namespace types{ extern const int d; typedef std::array<double, d> inputTy; } } Why do I get such compilation error? ../../include/types.h:16:29: error: the value of ‘d’...

MultipartEntityBuilder.create cannot be resolved to a type

java,eclipse,compiler-errors
I try to create a multipartEntityBuilder in oder to send an httpRequest. The code i found was using MultipartEntity, so i changed that to MultipartEntityBuilder. MultipartEntityBuilder reqEntity = new MultipartEntityBuilder.create(); This gives me an error MultipartEntityBuilder.create cannot be resolved to a type I have added the httpmime-4.5.jar file in my...

Dereferencing pointer to incomplete type error for a structure member

c,arrays,struct,compiler-errors,dynamic-memory-allocation
I have checked the other questions with similar problems, but none of the solutions worked for my case. The problem in hand is, I am trying to create a stack with dynamic memory, using this struct: struct stekas{ int content; struct stekas *link; } *top = NULL; However, I'm running...

conflicting types for my function “inverse”, which is designed to return long long type

c,function,compiler-errors,inverse,modular
I try to figure out what I did wrong here, basically the function is for calculating the module inverse number to a-1 mod m. but program is getting errors. can somebody point out what is causing the errors? //calculating the inverse of the public key, for getting private key d....

Typescript internal modules - unable to reference exported class within same module

javascript,compilation,compiler-errors,typescript,tsc
Hi! First off, sorry if this has been asked before, I tried some Googling but wasn't able to find anything (at least nothing that I recognised as being the same problem). I'm new to Typescript so still getting to grips! I'm making a little game as a project to brush...

C++ with Qt compile fail

c++,qt,compiler-errors

Call to implicitly-deleted copy constructor in LLVM(Porting code from windows to mac)

c++,osx,c++11,compiler-errors,llvm
We are in the process of porting some c++ code from windows to mac and are having issues compiling it with LLVM 6.1 using c++11. We are encountering errors all over the place of "Call to implicitly-deleted copy contructor" Some of these errors are popping up in our code. for...

Using ocamlbuild to build SDL and OpenGL application

opengl,compiler-errors,ocaml,sdl,ocamlbuild
I am trying to create an OCaml program utilizing both ocamlsdl and lablgl, but I can not figure out how to compile it. The relevant information is below: Note: ocamlsdl is not found by ocamlfind. When I go to the lib directory of .opam, I find an ocamlsdl folder, but...

iOS inline if else compile error: “Expected : ”; “Expected expression”

ios,objective-c,if-statement,compiler-errors
I am learning iOS programming (I come from Android) and I am looking for get Strings more easy. With this propose I define the next macro and use it in some code fragment: #define STRING_BASE @"InfoPlist" #define getString(string) NSLocalizedStringFromTable(string, STRING_BASE, @""); ... BOOL isSomething = YES; //or NO _label.text =...

tcc: error: undefined symbol '[email protected]'

c++,c,compiler-errors
I'm making a program in C/C++ which must run hidden using this code: #define _WIN32_WINNT 0x0500 #include <windows.h> int main(){ HWND hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_HIDE); . . . } I really want to use tinyc to compile it because it's much better than gcc (almost, the final executable is...

ActionListener of JComboBox and initialize JPanel

java,swing,compiler-errors,actionlistener,jcombobox
I want to write program in which you can chance scene (JPanel) thanks to JComboBox. I used ActionListener, but it doesn't work. At the beginning of constructor I defined panel as final, but it didn't help. scene.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String choice = String.valueOf(scene.getSelectedItem()); if(choice=="Sceneria"||choice=="Scene"){ slider.setEnabled(false);...

“Generics add stability to your code by making more of your bugs detectable at compile time.” - Explained in laymen's terms?

debugging,generics,types,compiler-errors
"Generics add stability to your code by making more of your bugs detectable at compile time." I keep reading this everywhere, but I can't seem to find an explanation for why generics help make errors more detectable in compile time rather then run time. Maybe this might be answered somewhere...

illegal start of expression and ';' expected error

java,compiler-errors,semicolon
I am getting the illegal start of expression and ';' expected errors. I searched for similar problems but I couldn't solve my problem. public int compare(Point point1, Point point2) Here is the full method. public static void sortByX(List<? extends Point> points) { Collections.sort(points, new Comparator<Point>() ); { public int compare(Point...

Dereferencing pointer to incomplete type error for struct member access in Python swig C wrapper

python,c,gcc,compiler-errors,swig
What is the error while compiling swig Python wrapper under GCC 4.8.2? wfdb_python_wrap.c:3967:11: error: dereferencing pointer to incomplete type if (arg1->fname) free((char*)arg1->fname); ^ wfdb_python_wrap.c:3967:36: error: dereferencing pointer to incomplete type if (arg1->fname) free((char*)arg1->fname); source code from wfdb_python_wrap.c: ... #include <wfdb/wfdb.h> ... #ifdef __cplusplus extern "C" { #endif SWIGINTERN PyObject *_wrap_WFDB_Siginfo_fname_set(PyObject...

Compiling issue with ifort composer_xe_2015.3.187

compiler-errors,fortran
I am compiling my Fortran code with the latest Fortran compiler composer_xe_2015.3.187 on Ubuntu 14.04 64 bit system. I am using this compiler flag: -fp-model precise The error message is: f95: error: precise: No such file or directory f95: error: unrecognized command line option ‘-fp-model’ The same code does not...

No resource found that matches the given name (at 'label' with value)

android,xml,compiler-errors
So I ran into this problem trying to get my signed APK, I have referenced it in my strings.xml and have tried deleting it and rewriting it nothing seems to work this is my Manifest.XML. I am sort of a noob at coding and stuff so a simple and thorough...

Compile-time method call validation for multiple parameters of the same type

c#,methods,compiler-errors
Here is demonstration of the problem: class Program { static double Func(double a, double b) { return a * 1000 + b * b; } static void Main(string[] args) { var a = 1.1d; var b = 2.2d; Console.WriteLine(Func(a, b)); // this is the problem, function doesn't recognize when a...

cannot find symbol method get(int)

java,compiler-errors
For a game i'm making I need to place a tetris-like piece on a 10x10 game board. I want to return "occupied" if the player tries to put the piece on an occupied square on my board. For this, I've made an initial method that returns true if the square...

How do you fix c++ expected primary expression error?

c++,compiler-errors
So, i'm new to c++ programming, and as a assignment my teacher is having us create an app. I started coding it and this is what i came up with. I tried to compile the code in CodeBlocks and it gave me quite a few errors: error: expected primary-expression before...

Brace-or-equal initializer causing C2098 and C2059 in Visual Studio 2015 RC [duplicate]

c++,visual-studio,c++11,compiler-errors,visual-studio-2015
This question already has an answer here: non-static data member initialization with new expression 2 answers The following, seemingly correct looking, code does not compile in Visual Studio 2015 RC, with errors like this: test.cpp(6): error C2098: unexpected token after data member 'T' test.cpp(11): note: see reference to class...

C: Error in Using: “Compound Assignment” and “Prefix Decrement” together

c++,c,compiler-errors,compound-assignment,prefix-operator
Can someone please tell me why the C compiler outputs an error while using a Compound Assignment and a Prefix Dec/Inc together ? [ but C++ does not ] int myVar = 5; (--myVar) -= 4; // C : error C2106: '-=' : left operand must be l-value // C++:...

Build Failure on Android Studio

android,compilation,compiler-errors,android-gradle,build.gradle
After updating all the Google support libraries to the latest versions, from v21 to v22.2.0 and Play Services to v7.5, my project no longer builds successfully. The log i get is as follows: app:preDexDebug AGPBI: {"kind":"simple","text":"Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar ","sources":[{}]} AGPBI: {"kind":"simple","text":"Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar ","sources":[{}]} AGPBI: {"kind":"simple","text":"Picked up JAVA_TOOL_OPTIONS:...

Implicit declaration of function and conflicting type - AVR

c++,c,compiler-errors,avr,atmega16
This is my first program for AVR. While building, the code is showing error: conflicting types for 'Encode' implicit declaration of 'Encode' I have written the following code: #include <avr/io.h> #include <util/delay.h> #include <stdlib.h> #define SegDataPort PORTC #define SegDataPin PINC #define SegDataDDR DDRC #define SegCntrlPort PORTD #define SegCntrlPin PIND #define...

syntax error : missing ')' before 'constant'

c,compiler-errors,macros,syntax-error,c-preprocessor
I have some syntax problems that I don't know how to fix. I'm trying to build some functions to matrix, can someone help me resolve those problems? 1>c:\documents and settings\one\my documents\visual studio 2010\projects\hw3\hw3\q2.c(11): error C2143: syntax error : missing ')' before 'constant' 1>c:\documents and settings\one\my documents\visual studio 2010\projects\hw3\hw3\q2.c(11): error C2143:...

Visual Studio 2013: Error MSB4014: The build was aborted because of an internal failure

c++,visual-studio-2008,visual-studio-2013,compiler-errors
After using VS08 without any problem for several months, I've decided to install VS2013. Unfortunately, VS won't stop crashing after Building/Rebuilding/Cleaning a simple project. I have just created an empty project with a main.cpp file outputing "Test", but it keep posting this error. I have seen some posts about it...

C# - How to handle empty user input?

c#,compiler-errors
Hello everyone i'm still a beginner in programming in general. So my question is how to handle empty user input in my simple code?, it give's me error every time i press enter with out a value. My code: //Program to find the number is even or odd. using System;...

Xcode : Compiler error Dictionary is not convertible to hashable

ios,xcode,dictionary,compiler-errors
I'm making an app in Xcode and the build fails even though there seem to be no errors in the code. I do, however, get this error: Compiler error Dictionary <>key, value <> is not convertible to hashable. How can I fix this? I have searched this but found nothing...

VS2008 Build C++ Project on Network Drive

c++,networking,visual-studio-2008,compiler-errors,virtual-machine
The short of it is, I have VMs for building different scenarios of software. I do not wish to snapshot the code as it is backup elsewhere so I am storing all my code on the host PC and only building/testing in VMs to save space. Unfortunately I am receiving...

Why do I need to add const to the argument?

linux,compiler-errors,g++,gtkmm
I have this function : void SpookyBoy( bool Troublemaker, const Glib::ustring& name, HorrorPunkBand& band ); if I remove the word const I got this error : no known conversion for argument 2 from ‘const char [5]’ to ‘Glib::ustring&’ I just wonder what does the compiler, can someone explains to me...

Haskell: ==' is not a (visible) method of class

haskell,compiler-errors,instance,equality,typeclass
So, when I compile the following piece of code edited: instance (Eq a) => PartOrd a where [] == [] = True (x:xs) == (y:ys) = x==y && xs==ys _==_ = False xs /= ys = not (xs == ys) I get: `==' is not a (visible) method of class...