IRC Log Viewer » #firebreath » 2011-10-05

IRC Nick Time (GMT-7) Message
danhigham 02:10 Hi all, does anyone know of any gotchas with referencing external libs for Windows plugins? My plugin works fine in OS 10 but not in Windows
dougma 05:10 danhigham: it fails to link or to load into the browser?
danhigham 05:10 linking
I have linked the .lib files using CMake
so they show up in the command for the linker
the annoying thing is, I am sure I have had this compiling in Windows before!
dougma 05:10 they are added to the lnk line and the linker doesn't say it can't find the library?
danhigham 05:10 pretty much, I get four separate counts of LNK2001
the odd thing is I have linked in two other libraries the same way and they are fine!
dougma 05:10 oh, "unresolved symbol" errors?
danhigham 05:10 yes
dougma 05:10 so you sure those symbols exist and that you have recompiled that lib and that you're linking to the latest lib? :)
danhigham 05:10 yes, I have used that dump tool, can't remember the name to show the symbols and they appear fine
dougma 05:10 c++ symbols or c symbols?
danhigham 05:10 I think they are c symbols
dougma 05:10 are you linking them to c++ code? did you remember the extern "C" thing?
danhigham 05:10 at the top of the header file for said library
#ifdef _MSC_VER
#define PM3CSAFE_API extern "C" __declspec(dllexport)
#define PM3CSAFE_API extern "C" __declspec(dllimport)
#define PM3CSAFE_API
dougma 05:10 looks good, and you're linking to the .lib (not the .dll)
danhigham 05:10 yes
dougma 05:10 well, i'm outta ideas. :)
danhigham 05:10 ok thanks anyway
it all compiles fine on the mac
very annoying
am_ 05:10 hello
I am trying to access microphone from FB but I get an exception do I need to set any permissions
dougma 05:10 hello
i don't think so
what is the exception?
am_ 05:10 I am using Team Speak actually , and when I run it as a stand alone exec it works fine, but when I want to access the Mic through FB it throughs an exception
dougma 05:10 i see. what is the exception?
am_ 05:10 unknown capturing device, wherease it should be my default device, so I guess it cannot access my default device for some reason
dougma 05:10 maybe so.
am_ 05:10 do have any idea , if I need to do anything in FB to let it access my devices?
dougma 05:10 i don't think so. what browser btw?
am_ 05:10 firefox, I haven't tried it with others yet
dougma 05:10 also try firefox with ipc off
but i don't it's fb
am_ 05:10 ok thanks will do that, will also check with team speak guys, thanks for your time mate
dougma 05:10 more likely your exe did some initialisation that your fb version didn't
or yeah, team speak have messed up. :)
am_ 05:10 possible :-)
thanks again, cheers
dougma 05:10 np
am_ 05:10 Hi dougma again
dougma 05:10 hello
am_ 05:10 sorry I have another question if you don't mind
they have a folder of dll files called soundbackends which should be in the same folder as the application, for FB I have copied it to the debug folder beside npxxx.dll file
is that ok?
dougma 05:10 umm... should be ok... unless they are doing something strange with the loading
in which case maybe copy them in with firefox.exe to be sure :)
am_ 05:10 aha ok will do that, so I don't need to mention them in my cmake files at all , do I?
dougma 05:10 not unless you're importing them... but you wouldn't got this far if you are
am_ 05:10 no you are right, the dll files are direct shows which they are using and I have imported their lib files anyway
I copied to firefox.exe folder and it worked , thanks alot mate
dougma 05:10 haha!
file a bug with team speak :)
or maybe that have an api where you can change their search path
am_ 05:10 will do that, I don't think they have but it is worth to ask, thanks for the help
manoj 13:10 hey guys... i have a question about updates. i registered a new method, changed the version no (in PluginConfig.cmake) and rebuilt the solution.
i run the msi installer therafter... which completes.
however, firefox doesn't seem to pick up the new plugin, unless i restart the browser.
the same with ie.
is this expected, i.e., to update, do i have to restart the browser?
taxilian 13:10 it depends on a few things. if you do it right, you shouldn't need to
manoj 13:10 hmm...
i guess i'm missing something...
taxilian 13:10 the main thing that will help is that you need to register it as a different filename, preferably in a different directory
I usually put it in a version specific directory
and put the version in the filename
but that's me
manoj 13:10 so, would that mean i would have to change the wxs file itself, so the msi changes?
i'm trying to use the provided wix installer, rather than doing a self registration as you've suggested
taxilian 13:10 yes
that would mean changing the wxs template file
manoj 13:10 cool... i'm trying that... thank you so much!
taxilian 13:10 good luck
manoj 13:10 interestingly, i could generate a separate folder but the dll file still comes out to be the same. is the file name generated picked up from the FBSTRING_PluginFileName variable?
taxilian 13:10 I think so
manoj 13:10 config.h says that this variable is npPluginTest- but the actual file in the directory is still npPluginTest.dll
taxilian 13:10 what version are you using?
manoj 13:10 oh.. so when i check the properties of that file in windows explorer, the 'original file name' is npPluginTest-
anyways, firefox still seems to not pick up the change unfortunately
taxilian 13:10 dunno; I've used it before and had it work. make sure the registry updated, the files are moved
they may have changed something that broke it in a recent version
manoj 13:10 hmmmm
just so i am not missing something, the previous dlls still live right? in the appdata directory?
taxilian 13:10 generally so, yes
manoj 13:10 i'll check the registry... again, thanks a lot!
taxilian 13:10 but the registry should be looking at hte new location
manoj 13:10 hmm...
well, so the registry path seems updated... it points to the new plugin directory, i.e.,
taxilian 13:10 the filename changing might help; I don't know
manoj 14:10 hmm... interestingly, IE (8) picks it up, but not Firefox (7) :)
taxilian 14:10 ie uses a totally different method for detection
try Chrome
manoj 14:10 hm...
i used safari installed on my windows box, and that detects the update too
taxilian 14:10 well, gotta run and get lunch
manoj 14:10 oh well... but i just started that anew, even a firefox rstart will figure it out
manoj 16:10 hey taxilian: so i managed to do the update without the firefox restart... but IE doesn't seem to load the right dll
even though it shows the right version number in the 'manage add-ons' menu
taxilian 16:10 how are you loading it with IE? and what version?
manoj 16:10 my page has some logic about deleting the object (plugin) from the DOM
and that works for FF, but not IE
IE 8
taxilian 16:10 as long as the new filename has been loaded, it's worked for me in the past; you could try loading it by classid insetad of mimetype
manoj 16:10 i'm loading it by mimetype
taxilian 16:10 last time I know for sure it was working for me I was using a clsid
so you could try that
dunno why it would matter, but you could try
manoj 16:10 hmm... the clsid is the one in npPluginTest.wxs right?
taxilian 16:10 !findfile PluginConfig.cmake
FireBreathBot 16:10 Found 4 matching file(s) in the master branch. First 4 are:
taxilian 16:10 it's the one in PluginConfig.cmake called FBControl_GUID
manoj 16:10 oh okay... i'll give that a shot
thank you again!
taxilian 16:10 good luck
manoj 16:10 no unfortunately changing to clsid did not work... still holding on to the older version of the plugin
do i have to change the clsid every time i update?
taxilian 16:10 no
I dont' know why it isn't working for you, but I have definitely used it without doing that
on IE8
manoj 16:10 hmm... okay, i'll poke around a bit more
thank you !
taxilian 16:10 you're 100% certain you're removing the old item from the dom and using the new one?
are you getting a new onload event?
manoj 16:10 umm... i think so... i'll make sure of that
actually, yes, after i 'unload', if i click on any of the plugin's methods, they don't work (no alerts)
then i reload the plugin (by re-inserting the object) and the methods work again
hopefully, that means that i'm releasing the object
taxilian 16:10 and if you refresh the page?
manoj 16:10 same thing ...
if i refresh the page, then load the object (i have a function to do this), it still doesn't pull my latest version of the plugin
essentially, one of the new methods (in the latest version) doesn't return anything
interestingly enough, if i open a completely new IE window, it loads the latest plugin ... kind of expected i guess ... but the other window still holds on to the older version
taxilian 17:10 strange
I don't know
taxilian 17:10 wow. Steve Jobs is dead
kylehuff 17:10 wow
taxilian 17:10 heh. the wikipedia page has already been updated
am_ 20:10 hello dougma
dougma 20:10 hello
am_ 20:10 I have a question mate, I have difned a JS event in my class using FB_JSAPI_EVENT(talkingstatuschanged, 3, (const std::string&, int,bool));
I need to be able to call this event from a static function, but it gives me error messages
any idea how I can do that
dougma 20:10 it's doesn't create a static method
an event has to be fired on an instance of a jsapi object
am_ 20:10 so there is no way to call it from a static method?
or a method outside my class
dougma 20:10 they are different things
am_ 20:10 yes I understand that, I either need to be able to call it from a static method or a method which is not in my class
dougma 20:10 api->fire_talkingstatuschanged()
am_ 20:10 either would work,
so I can use api->fire_talkingstatuschanged() to call from a method ouside the class?
dougma 20:10 sure
but you can't go api::fire_talkingstatuschanged()
am_ 20:10 I am getting error C2065: 'api' : undeclared identifier
do I need to define it somewhere?
dougma 20:10 api needs to be an instance of your jsapi class
am_ 20:10 I see
dougma 20:10 if you don't have an instance, you can't fire an event
am_ 20:10 I don't instantiate it myself, so can I access the instance of my class ? I am calling this iSeeAudioAPI->fire_talkingstatuschanged(name,clientID,true); (I haven't instantiate the api) and it returns
error C2143: syntax error : missing ';' before '->'
dougma 20:10 you're right, the webpage instantiates your plugin.
am_ 20:10 I see, so technically the line iSeeAudioAPI->fire_talkingstatuschanged(name,clientID,true); should work
dougma 20:10 i don't know about 'technically'
show code.
FireBreathBot 20:10 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin.,, and are all good options
dougma 20:10 anyway, the webpage calls your api
so you have a reference to your api at that point
look at fbtestplugin to see how events are fired
am_ 20:10 you are right dougma, but I have to fire this event from inside the api code
dougma 20:10 your api?
am_ 20:10 just let me please to show you my code
void onTalkStatusChangeEvent(uint64 serverConnectionHandlerID, int status, int isReceivedWhisper, anyID clientID) { char* name; //iSeeAudioAPI::TTT(); /* Query client nickname from ID */ if(ts3client_getClientVariableAsString(serverConnectionHandlerID, clientID, CLIENT_NICKNAME, &name) != ERROR_ok) return; if(status == STATUS_TALKING) { iSeeAudioAPI->fire_notify();//iSeeAudioAPI::talkstatuschanged(name,clientI
dougma 20:10 .pb
FireBreathBot 20:10 When you need to share code, logs, or anything else longer than a couple of lines, use a pastebin.,, and are all good options
dougma 20:10 when you're in your api, you just go fire_talkstatuschanged()
(this->) is im-plicit
that's c++ for you. :)
am__ 20:10 sorry dougma I was disconnected
could u pls take a look at this
this function is outside my class, and I couldn't define it as my class method
I need to fire the event from there
dougma 20:10 well you need to get a reference to your api into it
am__ 20:10 how do I do that, as you said it is getting instantiated from the web page
dougma 20:10 done much c++ before?
am__ 20:10 yes but more C# actually,
I can instantiate the class again, but it is not going to be the same instance
dougma 20:10 no
am__ 20:10 I tried to use singleton as well but it didn't work
dougma 20:10 it won't
am__ 20:10 anyway that I can get the current instance?
dougma 20:10 there is no 'current'
you can have multiple instantiations
am__ 20:10 ok so this multiple is from the web page again?
dougma 20:10 yes
am__ 20:10 ok thanks for your time anyway, will try to work it out
dougma 20:10 as i said, when the webpage calls you, you have your instance pointer
am__ 21:10 ok so I have to do all these callings from the webpage itself
dougma 21:10 well, the first call is an instantiation
which happens when your plugin is created on the page
so you have an instance then too
am__ 21:10 I see
thanks again
dougma 21:10 ok
taxilian 21:10 hmm. installed a SSD in my macbook pro, and installation is going really, really, really slow
this does not bode well
either there is something really strange about the interaction between an SSD and the Mac OS install or else I must have a bad drive
linearray 21:10 which model is it?
taxilian 21:10 CT512M4SSD2
I have found one other report of someone experiencing this problem
but many others say it works great for them
maybe after install (finally) finishes it will work
linearray 22:10 I was thinking about buying the same one, but I don't trust anyone but intel
taxilian 22:10 Crucial has always worked well for me
until now
I'll let you know what happens when it finishes; I switched to my 10.6 installer instead of 10.7, and that's moving faster (though still ridiculously slow)
linearray 22:10 I guess once it's installed you can just run a bonnie++ test run