Undefined reference to class constructor, including .cpp file fixes

The undefined reference error indicates that the definition of a function/method (i.e constructor here) was not found by the linker. And the reason that adding the following line: fixes the issue, is it brings in the implementation as part of the main.cpp whereas your actual implementation is in StaticObject.cpp. This is an incorrect way to fix this problem. I haven’t used Netbeans … Read more

How can I use adb over WiFi?

Connect Android phone and host machine to same WiFi network Connect Android phone to host machine using USB cable (to start with) Run adb tcpip 5555 from a command prompt Run adb shell “ip addr show wlan0 | grep -e wlan0$ | cut -d\” \” -f 6 | cut -d/ -f 1″ to obtain the phone’s IP address Disconnect USB cable … Read more

Remote debugging a Java application

Edit: I noticed that some people are cutting and pasting the invocation here. The answer I originally gave was relevant for the OP only. Here’s a more modern invocation style (including using the more conventional port of 8000): Original answer follows. Try this: Two points here: No spaces in the runjdwp option. Options come before the class name. … Read more

How can I write to the console in PHP?

Firefox On Firefox you can use an extension called FirePHP which enables the logging and dumping of information from your PHP applications to the console. This is an addon to the awesome web development extension Firebug. http://www.studytrails.com/blog/using-firephp-in-firefox-to-debug-php/ Chrome However if you are using Chrome there is a PHP debugging tool called Chrome Logger or webug (webug has problems with the order of … Read more

Visual Studio debugger error: Unable to start program Specified file cannot be found

Guessing from the information I have, you’re not actually compiling the program, but trying to run it. That is, ALL_BUILD is set as your startup project. (It should be in a bold font, unlike the other projects in your solution) If you then try to run/debug, you will get the error you describe, because there … Read more

PHP parse/syntax errors; and how to solve them

PHP belongs to the C-style and imperative programming languages. It has rigid grammar rules, which it cannot recover from when encountering misplaced symbols or identifiers. It can’t guess your coding intentions. Most important tips There are a few basic precautions you can always take: How to interpret parser errors A typical syntax error message reads: Parse error: syntax error, … Read more

Unfortunately MyApp has stopped. How can I solve this?

This answer describes the process of retrieving the stack trace. Already have the stack trace? Read up on stack traces in “What is a stack trace, and how can I use it to debug my application errors?“ The Problem Your application quit because an uncaught RuntimeException was thrown.The most common of these is the NullPointerException. How to solve … Read more

Unfortunately MyApp has stopped. How can I solve this?

This answer describes the process of retrieving the stack trace. Already have the stack trace? Read up on stack traces in “What is a stack trace, and how can I use it to debug my application errors?“ The Problem Your application quit because an uncaught RuntimeException was thrown.The most common of these is the NullPointerException. How to solve … Read more