QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

Why do I get an error about an undefined reference to "__inet_ntoa" or other __inet_* symbols?

Apache Server Frequently Asked Questions
If you have installed BIND-8 then this is normally due to a conflict between your include files and your libraries. BIND-8 installs its include files and libraries /usr/local/include/ and /usr/local/lib/, while the resolver that comes with your system is probably installed in /usr/include/ and /usr/lib/. If your system uses the header files in /usr/local/include/ before those in /usr/include/ but you do not use the new resolver library, then the two versions will conflict.

Why does the build fails with undefined symbols?

LessTif Frequently Asked Questions
On the other hand, please make sure that you've built the entire distribution with the same configuration. Not clear ? After running the "configure" command with its options, you should ideally run "make clean". Otherwise e.g. clients/Motif-1.2/mwm/Makefile may be configured such that it looks for stuff that isn't there in lib/Xm/* .

Why do I get undefined symbols starting with "mpi_"?

ESMF FAQ
You've most likely compiled your program with a mix of MPI and non-MPI, particularly compiling some .o's with MPI but then linking without. The error can look like: To fix, remove all of your .o's and .a's, and recompile from the beginning. With clm, this most likely means you need to rm -r your obj directory and then reuse your run script.

Why the undefined reference to WinMain@16?

Cygwin FAQ
If you're using gcc, try adding an empty main() function to one of your sources. Or, perhaps you have -lm too early in the link command line. It should be at the end: bash$ gcc hello.c -lm bash$ ./a.exe Hello World! works, but bash$ gcc -lm hello.c /c/TEMP/ccjLEGlU.o(.text+0x10):hello.c: multiple definition of 'main' /usr/lib/libm.a(libcmain.o)(.text+0x0):libcmain.c: first defined here /usr/lib/libm.a(libcmain.o)(.text+0x6a):libcmain.

Why do I get "undefined reference to gzputc"?

Frequently Asked Questions about zlib
check that you don't have old files libz.* in /usr/lib, /usr/local/lib or /usr/X11R6/lib. Remove any old versions, then do make install.

How can I get the parser to accept a dummy reference without an error?

MATLAB Frequently Asked Questions
MATLAB parses code to look for syntax errors. When the parser encounters a name with 2 or fewer arguments, it lets them pass since they might be a variable with indices. If it encounters a name with 3 or more arguments, MATLAB knows it cannot be a variable, so the error message is returned. If you don't want the parser to snag the function, specify one with 2 or fewer arguments.

How are your symbols put together?

Frequently Asked Questions | USDA PLANTS
Each symbol is composed of the first two letters of the genus+first two letters of the species+first letter of the terminal infraspecific name+tiebreaking number (if needed). Genus and family symbols are the first five (genus) or six (family) letters of the name, plus tiebreaking number (if needed). Symbols were first used in the Soil Conservation Service’s National List of Scientific Plant Names (NLSPN), and have been perpetuated in the PLANTS system.

I get an error when I use \thebibliography. It says \newblock undefined. What gives?

ThesisTeX FAQ list
Yep, \newblock is undefined. Include the following, for example in your mydefs.sty, or modify it if you like:

How do I fix the Call to undefined function error?

Smarty Frequently Asked Questions - SmartyWiki
Something's gone wrong! I wrote the template, wrote the PHP code, included Smarty.class.php, intialized object, etc... But one of my templates doesn't produce any output! There are no error messages too!

How do I fix the 'Call to undefined function: ()' error?

Smarty Frequently Asked Questions - SmartyWiki
One possible cause of this problem is Smarty trying to use some code from a plugin when the plugin has not been loaded properly. Check the permissions on your plugins directory. Something's gone wrong! I wrote the template, wrote the PHP code, included Smarty.class.php, intialized object, etc... But one of my templates doesn't produce any output! There are no error messages too ! Check permissions to your template file. It should be world readable (try to chmod a+r mytemplate.

How do I fix this error: "Undefined property: isAdmin..."?

Admin FAQ
Make sure that your BugPort iuser table has the new isAdmin column (see UPDATE.txt) and that the column is set to 1 or 0 for all users (not null). Set it to 1 for users that can act as BugPort admins. BugPort's conf/config.conf is run through PHP's eval to load the configuration values. This eval is called in conf/configuration.php which defines a series of constants based on the variables defined in conf/config.conf. So, your conf/config.

Why does the linker complain about undefined symbols?

OpenSSL: Support, Frequently Asked Questions
Maybe the compilation was interrupted, and make doesn't notice that something is missing. Run "make clean; make". If you used ./Configure instead of ./config, make sure that you selected the right target. File formats may differ slightly between OS versions (for example sparcv8/sparcv9, or a.out/elf).

Why do I get undefined symbols when linking with curses/termcap?

Solaris 2 FAQ
It is easy to mixup the BSD libcurses and the SVR4 libcurses. One lives in /usr/ucblib, the other in /usr/ccs/lib, when you've installed SUNWarc. Note that when you specify: you will pick the ucb version of libcurses, not the SVR4 version. If you always put libucb last, as recommended in the previous question, you will have no such problem.

How do I find undefined g++ symbols __builtin_new or __pure_virtual?

Extending/Embedding FAQ
To dynamically load g++ extension modules, you must recompile Python, relink it using g++ (change LINKCC in the python Modules Makefile), and link your extension module using g++ (e.g., "g++ -shared -o mymodule.so mymodule.o"). The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html) provides a way of doing this from C++ (i.e. you can inherit from an extension class written in C++ using the BPL).

Why does the compiler generate undefined template symbols?

C++ Development Environment - ugu
Why does the compiler generate duplicate symbol errors when I use automatic instantiation? [C_PLUS_PLUS 4245]

Anchor(comp_undef)]]Why do I get {{{undefined reference to 'main'}}} errors?

GCJ FAQ - GCC Wiki
When using GCJ to link a Java program, you must use the --main= option to indicate the class that has the desired main method. This is because every Java class can have a main method, thus you have to tell gcj which one to use. GCJ will compile both source (.java) and bytecode (.class) files. However, in many cases the native code produced by compiling from source is better optimized than that compiled from .class files.

What does "undefined reference" to blah-blah mean?

Beginner FAQ - GPWiki
This is known as a linker error and is the most common linker error. I'll assume you know about functions. Let's say you called a function that creates a window for you, CreateWindow(). Since you didn't write CreateWindow() and somebody else did, you need to tell the linker where to find CreateWindow() because it did not find it on its own. Maybe CreateWindow() is part of a library called XXX. The solution to this problem depends on what compiler/IDE you are using.

Q7: Why does the compiler generate undefined symbols for functions taking pointer to functions?

C++ Development Environment - ugu
In a linkage specification, the specified language linkage applies to the function types of all function declarators, function names, and variable names introduced by the declaration. For example: extern "C" void f1(void (*pf)(int)); // the name f1 and its function type have C linkage; // pf is a pointer to a C function In the following example, the argument errFunc has C linkage in the declaration but has C++ linkage in the definition in func.cpp.

Why does a reference give me an error when I try to revisit it?

Connotea: faq
A number of websites use session-based URLs. This means that a different URL is generated each time you visit the same page, and there is no permanent link. Therefore, the link you have saved in Connotea will expire immediately, and will no longer be valid the next time you try to go back to it. An easy solution to this problem is to save the DOI of the paper instead of the URL. This will provide a permanent link for you to follow back. For help on how to save a DOI, please see the site guide.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact