Questions tagged [undefined-function]

An undefined function is a function that fails to execute when called due to the body of the function not being available to the program, compiler, or interpreter, looking for a function definition.

143 questions
2
votes
2 answers

g++ compiler not generating error/warning for undefined methods

I have a class that has a declared method but not defined/used anywhere. I expected this piece of code to generate linking error but it did not. Looks like compiler is smart enough to remove dead code. Which default optimization is doing this? How…
Rachit Agrawal
  • 3,203
  • 10
  • 32
  • 56
2
votes
3 answers

How to leave a declared function undefined in C++ like with `undefined` in Haskell?

In Haskell there is a constant called undefined that you can use to declare a function without defining it (i.e. a function prototype with an empty body) as with squarein square :: Int -> Int -- declaration square = undefined -- empty…
manews
  • 340
  • 2
  • 12
2
votes
1 answer

"Error A2006: Undefined Symbol, Macro Called From, Main Line Code"

I am trying to provide a skeleton frame of a final project, which is a FP calculator. However, I've run into some trouble. If I compile this code, I get . I am unsure what assembly this is, but I believe its 32bit and am using MASM compiler. The…
Jordan
  • 21
  • 3
2
votes
0 answers

SDL2 - Undefined references to functions (SDL_CreateWindow SDL_CreateRenderer SDL_RenderPresent SDL_Delay)

I try to compile a c++ code with the library SDL2 at school in debian x32 but I got few error: main.cpp:(.text+0x39): undefined reference to `SDL_CreateWindow' main.cpp:(.text+0x59): undefined reference to `SDL_CreateRenderer' main.cpp:(.text+0x69):…
Dash
  • 21
  • 3
2
votes
2 answers

Call to undefined function in GetEntityManager() in cli-config.php

I tried installing doctrine2 orm from composer, it was successfull, I setup my bootstrap.php as shown below
1
vote
0 answers

Autoload not pulling in use_helper() after upgrading Symfony 1.4 project to PHP 8.2 via FriendsOfSymfony

I'm attempting to upgrade a large legacy Symfony 1.4 project to run under PHP 8.2 (currently running under PHP 5.6) using the FriendsOfSymfony project. Upgrade to Symfony 5.4 will come later when we have more budget, the current priority is to get…
justdave
  • 46
  • 4
1
vote
0 answers

How do I make sure that a function is not undefined in typescript?

I'm sorry for the terrible title, but I have the following situation: I'm using angular with Knova node package to create a webapp for my thesis work to finish Uni. I have two components on one of my pages: the first one being a navbar, and the…
Benjamin
  • 11
  • 1
1
vote
1 answer

NodeJS Mongoose with Transactions | Can't find Schemafunction

I have here the following non-working minimalexample where i want to call customer.hello() but I will get an TypeError: customer.hello is not a function. //app.js require("dotenv").config(); const mongoose = require('mongoose'); const Customer =…
1
vote
1 answer

Undefined method 'id' error using collection_select with form_for in Ruby on Rails

I'm having an issue with collection_select using form_for in rails. This issue is coming from a method that was working until I namespaced my routes to be only for admin. The admin routes are working as they should as far as I can tell, but it is…
1
vote
1 answer

type error dialog.showmessageBoxSync is not a function

I just started using electron and fail to use showmessageBoxSync: it returns the error: type error dialog.showmessageBoxSync is not a function isn't showmessageBoxSync a member of dialog which is a property of returned object returned by…
Jack
  • 16,276
  • 55
  • 159
  • 284
1
vote
1 answer

I'm getting BadMethodCallException "Client::confidential()" from Laravel passport with MongoDB

I'm getting this error, and I didn't understand why Call to undefined method DesignMyNight\\Mongodb\\Passport\\Client::confidential() Knowing that I'm using MongoDB as a database I sent a POST request with this header and…
Khalil Bz
  • 557
  • 1
  • 9
  • 24
1
vote
3 answers

The method is undefined for the type T

I am trying this example, but can't make it work; it throws The method getFromInt(int) is undefined for the type T T is a generic enum type public static T deserializeEnumeration(InputStream inputStream) { int asInt =…
Salem Masoud
  • 411
  • 11
  • 32
1
vote
1 answer

Error: Function 'subsindex' is not defined for values of class 'TreeBagger'

I have trained a random forest for binary classification via TreeBagger: Mdl = TreeBagger(trees, X1, y1, 'NumPredictorsToSample', features, ... 'OOBPrediction', 'on', 'Method', 'classification', 'OOBVarImp', 'on'); I am trying to…
Thomas
  • 158
  • 9
1
vote
1 answer

Converting MysQl Time to decimal format

I'm trying to convert Time format 00:00:00 to decimal 0.00. I tried this:
Sebastian Farham
  • 815
  • 2
  • 13
  • 27
1
vote
2 answers

skip function if missing script

I am building within a content management system, so I have to get creative with load functions. I have 2 scripts running on load. A random background image for the home page, and the navigation menu. I included both in a separate script that runs…
Valerie
  • 35
  • 1
  • 7
1
2
3
9 10