[haiku-development] Re: Help regarding GSoC idea : Tracker add-on for a version control system

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 26 Mar 2018 07:18:14 +0000

26 mars 2018 09:16 "Hrishi Hiraskar" <hrishihiraskar@xxxxxxxxx> a écrit:

Did you install the modified TrackerAddOn.h so that it is used when you 
compile the add-on? It
may be simpler to just copy the prototype of populate_menu to the file where 
you implement it
(don't forget the extern "C" in it).

Yes I added extern "C" in TrackerAddOn.h and I'm using it in the system.

You can check with readelf if the function is properly exported by your 
addon (I commented on
your draft proposal with the command to run)

The followiing is the output of the command.

~/haiku_addon> readelf -aW addon | grep "populate_menu"
22: 000015f0 1062 FUNC GLOBAL DEFAULT 10 
populate_menu__FG9entry_refP8BMessageP9BMenuItem
100: 000015f0 1062 FUNC GLOBAL DEFAULT 10 
populate_menu__FG9entry_refP8BMessageP9BMenuItem

This shows that the function has C++ mangling (its name is 
populate_menu__FG9entry_refP8BMessageP9BMenuItem, not just populate_menu).
So the extern "C" was not taken into account.

-- 
Adrien.

Other related posts: