Reputation: 35
I have a FF toolbar working in all previous versions. My toolbar partially written in C++. I've tried to build the C++ part with xulrunner-sdk-15.0.1 (I tried also xulrunner-sdk-16.0.1) In both versions I receive a link error.
1>Link:
1> Creating library C:\Dev\Projects\fftoolbar\toolbar\src\components\vc2010\\..\bin\win32\agat.lib and object C:\Dev\Projects\fftoolbar\toolbar\src\components\vc2010\\..\bin\win32\agat.exp
1>xpcomglue_s.lib(nsStringAPI.obj) : error LNK2001: unresolved external symbol __imp___snprintf
1>xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp__rand
1>xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp__srand
1>xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp___fdopen
1>xpcomglue_s.lib(nsCRTGlue.obj) : error LNK2001: unresolved external symbol __imp___dup
1>C:\Dev\Projects\fftoolbar\toolbar\src\components\vc2010\..\bin\win32\agat.dll : fatal error LNK1120: 5 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.39
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Has somebody idea how it can be solved?
Upvotes: 0
Views: 169
Reputation: 57651
These symbols are exposed by msvcrt.lib
(runtime library). So you probably configured the project to ignore standard libraries - you need to add msvcrt.lib
to the list of libraries explicitly then.
Just in case you don't know: js-ctypes allow you to have compiled code in your extension without having to use binary XPCOM components and recompiling them for each Firefox version. You can include a regular Windows DLL in your extension and use js-ctypes to call its functions. The drawback: this DLL won't have access to XPCOM. So if you really need low-level XPCOM access that JavaScript doesn't have then you cannot avoid binary XPCOM objects.
Upvotes: 2