linkage

Link error using templates

I converted a function to a template, and started getting this error. I must not be understanding a limitation of templates. Can someone tell me why this is broken? I am receiving this error: Undefined symbols: "bool foo<int>(int const&, int const&)", referenced from: _main in file1.o ld: symbol(s) not found When I link the...

What is the explanation behind the below declaration/keyword?

Hello, I would like to know what the following declarations do. I have seen them in a C code on MSVisual Studio Compiled code. extern "C" __declspec(dllexport) extern "C" __declspec(dllimport) I know somewhat that they are used to declare external linkage for functions(functional defined in different source file.But would like to kno...

static vs extern "C"

(expert C/C++ question) What is the difference between a static member function and an extern "C" linkage function ? For instance, when using "makecontext" in C++, I need to pass a pointer to function. Google recommends using extern "C" linkage for it, because "makecontext" is C. But I found out that using static works as well. Am I just...

Explain about linkages(external/internal) in c++?

Explain about linkages(external/internal) in c++? How does linkage differ for a function,constant,inline function,template function ,class and template class ...

What is the impact of namespaces in c++ linkages compared to linkages in c?

What is the impact of namespaces in c++ linkages compared to linkages in c? Is it possible to make a name that has internal linkage to external linkage just by using namespace.Similarly the other way around. ...

Determining C executable name

When we are compiling a C program the output is stored in a.out. How can we redirect the compiled output to another file? ...

Does the anonymous namespace enclose all namespaces?

In C++ you specify internal linkage by wrapping your class and function definitions inside an anonymous namespace. You can also explicitly instantiate templates, but to be standards conforming any explicit instantiations of the templates must occur in the same namespace. AFAICT this should compile, but GCC fails on it: namespace foo { ...

ActionScript 3 MovieClip class linkage

Hi, I'm simply playing around with basic ActionScript 3 using Flash CS3 Pro. I put in a keyframe this very simple code to duplicate n "brander" symbols: for (var i:Number=0; i<20; i++) { var m = new brander("MS_"+i); addChild(m); m.name = "MS_"+i; m.x = 20*i; m.alpha = a; a-=0.05; m.y = 20; } The symbol is...

Dependency Property dependent on another

How can one register a dependency property whose value is calculated using the value of another dependency property? Because the .NET property wrappers are bypassed by WPF at run-time, one should not include logic in the getters and setters. The solution to that is typically to use PropertyChangedCallbacks. But those are declared stat...

C++ - Import of explicitly specialised templates on Windows

I am having some trouble getting a program to link on Windows with VC2008 SP1. I am explicitly specialising a template member function in a DLL, which appears correctly as an exported symbol in dependency walker, for the correct type, and with the correct arguments. When I try to call the symbol from an .exe, the linker complains that i...

Linkage in C: does GCC follow the C99 spec, or do I not understand the spec?

I'm trying to understand the exact behavior of storage class specifiers in C99, and some GCC behavior seems not to follow the spec, unless I misunderstand the spec. From 6.2.2 (2): Within one translation unit, each declaration of an identifier with internal linkage denotes the same object or function. However, I tested GCC (powerp...

Linkage Table: Technical name given to table storeing assoications?

Title pretty much sums it up. Is there a technical name given to a table that stores primary key from two separate tables to create a linkage. i.e. car ( id, manufacturer, model, year, vin), passenger ( id, name ), linkage_table ( car, passenger ) Where car stores value of the id column from the car table and passenger stores the val...

ReferenceError: Error #1008 Class is ambiguous

I have a As3 file and I get a runtime error: ReferenceError: **Error #1008**: Tooltip is ambiguous; Found more than one matching binding. I have a class named Tooltip and also a symbol in library with linkage class: Tooltip and Base Class fvg.Tooltip (fvg is the name of the package). Why I get this conflict? ...

Makefile automatic link dependency ?

It's easy to let program figure out the dependency at compile time, (with gcc -MM). Nevertheless, link dependency (deciding which libraries should be linked to) seems to be difficult to figure out. This issue become emergent when multiple targets with individual libraries to link to are needed. For instance, three dynamic library target...

About inconsistent dll linkage

How can I remove this link warning? You can see code segment that causes this warning. Also Thanks in advance. static AFX_EXTENSION_MODULE GuiCtrlsDLL = { NULL, NULL }; //bla bla // Exported DLL initialization is run in context of running application extern "C" void WINAPI InitGuiCtrlsDLL() { // create a new CDynLinkLibrary...

STL Static-Const Member Definitions

How does the following work? #include <limits> int main() { const int* const foo = &std::numeric_limits<int> ::digits; } I was under the impression that in order to take an address of a static const-ant member we had to physically define it in some translation unit in order to please the linker. That said, after looking at the prep...

Grails XOM linkageerror - SAXParserException

Possibly related: http://stackoverflow.com/questions/2762439/grails-attempting-to-include-htppbuilder-linkage-error I'm trying to include XOM in my grails project. How do I know which dependency library I need to exclude? I'm lost here. dependencies { build('xom:xom:1.1') { excludes "xml-apis" } } Error: java.lang.Li...

How did it happen that "static" denotes a function/variable without external linkage in C and C++?

In C static can mean either a local variable or a global function/variable without external linkage. In C++ it can also mean a per-class member variable or member function. Is there any reference to how it happened that the static keyword that seems totally irrelevant to lack of external linkage is used to denote lack of external linkag...

C callback functions defined in an unnamed namespace?

Hi all. I have a C++ project that uses a C bison parser. The C parser uses a struct of function pointers to call functions that create proper AST nodes when productions are reduced by bison: typedef void Node; struct Actions { Node *(*newIntLit)(int val); Node *(*newAsgnExpr)(Node *left, Node *right); /* ... */ }; Now, in the C+...

How extensive is an Object in CakePHP model linkage?

I was hoping someone with an understanding on CakePHP could shed some light on a question I've been having. Here's my scenario, I have a User this User has a Company which in turn has many Department and many Address. If I were to get a User could I expect to have access to the Company and all models associated with that Company? So wo...