Topic: Cross-compilation of an olsr plugin in C/C++

Hello

I'm actually writing an olsr plugin in C and C++. He works well on a Backtrack laptop : compilation of olsr create one dynamic library per plugin and mine works, when I load it in olsr config file.

However, when i do the same thing with OpenWRT buildroot, i still get a dynamic library. But when i load it on my wireless router, i get a Segmentation Fault.

A ldd command on the dynamic library gets me good dependencies on the first case, but doesn't work for the second case :  "not a dynamic executable".

I suspect the C++ code to fail my compilation of my dynamic library for openwrt. But I didn't find an olsr plugin wrote in C and C++.

So, my questions are :
- how to compile a dynamic library plugin for olsr ?
- or how to compile a C++ dynamic library for openWRT ?

If someone has examples, it would be great and very helpfull !

Thank you !

Re: Cross-compilation of an olsr plugin in C/C++

Hi and welcome to the forum !

I think you can try to reright your module in C style cause the C++ might be the problem here...

Good luck with that

--

Raptor from the death

Re: Cross-compilation of an olsr plugin in C/C++

Thank you but my module use boost libraries. So i use C++ and i am searching a solution which will keep this language...

Re: Cross-compilation of an olsr plugin in C/C++

Mhh so try to debug your program to see where it does the segmentation fault and why, this way you should be able to know how to deal with your problem.

Cheers

Re: Cross-compilation of an olsr plugin in C/C++

For the moment, I didn't success to debug an olsr plugin. gdb works fine with olsr deamon but not with plugins.

Re: Cross-compilation of an olsr plugin in C/C++

What do you mean about "it works with olsr but not with plugins" ?

When you try to debug your olsr daemon with the loaded plugins, gdb is not able to trace the seg fault or gdb can't load olsr at all ?

Cheers

Re: Cross-compilation of an olsr plugin in C/C++

I just can see that it might happen when olsrd load lboost libraries.

Something may be wrong in my compilation but i don't find examples of olsr plugin in C/C++ so...