[Lemon-user] Newbie question on data types for maps

Clark, Connor R. CLARKCR1 at GCC.EDU
Wed Nov 17 23:35:51 CET 2010


My apologies if this is explained somewhere, but I can't find it in the documentation:

What kinds of data types can be used in maps? I have tried to use my own classes with maps, and just get linker errors. Built-in types seem to work fine.

For example:

#include <lemon/smart_graph.h>
#include <lemon/concepts/maps.h>
using namespace lemon;

struct simple{
      int data;
};

int main(){
      SmartGraph a;
      SmartGraph::NodeMap<simple> test(a);
      return 0;
}

Gives the error:
1>main.obj : error LNK2001: unresolved external symbol "struct lemon::Invalid const lemon::INVALID" (?INVALID at lemon@@3UInvalid at 1@B)
With Microsoft's compiler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20101117/368fbbc5/attachment.html>


More information about the Lemon-user mailing list