Eyescale/Equalizer

Linking error to eq::Config::getObserver, VS2010

Closed this issue · 4 comments

Even though I am adding all the relevant libs (lunchbox.lib;collage.lib;sequel.lib;equalizer.lib;EqualizerFabric.lib;EqualizerServer.lib;EqualizerAdmin.lib;GLEW_MX_Equalizer.lib;triply.lib)

The following code:
void f (eq::Config *c)
{
eq::fabric::ObserverPath p;
c->getObserver(p);
}
gives me this linking error:

error LNK2019: unresolved external symbol "public: class eq::Observer * __thiscall eq::fabric::Config<class eq::Server,class eq::Config,class eq::Observer,class eq::Layout,class eq::Canvas,class eq::Node,class eq::fabric::ConfigVisitor<class eq::Config,class eq::fabric::LeafVisitor,class eq::fabric::ElementVisitor<class eq::Layout,class eq::fabric::LeafVisitor >,class eq::fabric::ElementVisitor<class eq::Canvas,class eq::fabric::LeafVisitor >,class eq::fabric::ElementVisitor<class eq::Node,class eq::fabric::ElementVisitor<class eq::Pipe,class eq::fabric::ElementVisitor<class eq::Window,class eq::fabric::LeafVisitor > > > > >::getObserver(struct eq::fabric::ObserverPath const &)" (?getObserver@?$Config@VServer@eq@@v02@VObserver@2@VLayout@2@VCanvas@2@VNode@2@V?$ConfigVisitor@VConfig@eq@@v?$LeafVisitor@VObserver@eq@@@fabric@2@V?$ElementVisitor@VLayout@eq@@v?$LeafVisitor@VView@eq@@@fabric@2@@42@V?$ElementVisitor@VCanvas@eq@@v?$LeafVisitor@VSegment@eq@@@fabric@2@@42@V?$ElementVisitor@VNode@eq@@v?$ElementVisitor@VPipe@eq@@v?$ElementVisitor@VWindow@eq@@v?$LeafVisitor@VChannel@eq@@@fabric@2@@fabric@2@@fabric@2@@42@@fabric@2@@fabric@eq@@QAEPAVObserver@3@ABUObserverPath@23@@z) referenced in function "public: __thiscall seqGenome::vrpnTracker::vrpnTracker(class eq::Config *,class seqGenome::GenomeAppObject *)" (??0vrpnTracker@seqGenome@@QAE@PAVConfig@eq@@PAVGenomeAppObject@1@@z)

Does anybody have an idea of what the problem might be?
I have noticed that the function is defined in config.ipp, and that that file is not included from config.h, but I have not been able to get this to work.

The function is not exported with EQFABRIC_INL as the ones above, but nonetheless this function is marked internal so you are not entitled to use it. You may want to use

find<eq::Observer>(name/id)

instead.

Ah, good to know. I had a lot of problems to write that code. Where can I find the documentation for find? I can´t find it in http://www.equalizergraphics.com/documents/Developer/doxies/Equalizer-1.8/namespaceeq.html
I also don´t have the name/id of the observer, I guess "0" should be enough.
Edit: a 0 makes the program explode, also in linux. Does anybody know the correct way to express what my code in the first message does (which works in Linux)?

The 'sparse' documentation is here:
http://www.equalizergraphics.com/documents/Developer/doxies/Equalizer-1.8/classeq_1_1fabric_1_1_config.html#a800bad8102922f984cdcdc7ee920e7b9

And you should/need to have a name to get the observer you want. Every entity has a name, most of them are empty by default, but you can give a name to the observer in the config file.

Ok, I changed it to "0" and it works again in LInux, but it explodes in Windows. I´ll have a closer look, as there may be other problems with the windows build and it may be exploding because of other reasons.
I think if no configuration file is passed, a default configuration file is created on the fly, but my program in exploding in windows much earlier than that. Strange

PID.Thread | Filename:line | ms | Message
7860. Equalizer\seq\application.cpp:80 9 Assert: !_impl in:
9: lunchbox::backtrace - 0x563de6a0
8: std::basic_ostream<char,std::char_traits >::operator<< - 0x5633bc00
7: lunchbox::abort - 0x563ddf00
6: seq::Application::init - 0x572f02a0
5: Unknown symbol
4: Unknown symbol
3: Unknown symbol
2: BaseThreadInitThunk - 0x77153378
1: RtlInitializeExceptionChain - 0x77689f0f
0: RtlInitializeExceptionChain - 0x77689f0f
7860. c\Lunchbox\lunchbox\debug.cpp:44 386