MozTW 討論區 https://forum.moztw.org/ |
|
請教我的Scriptable Components是哪裡不對 https://forum.moztw.org/viewtopic.php?f=18&t=20748 |
第 1 頁 (共 1 頁) |
發表人: | megaman [ 2007-10-23, 11:08 ] |
文章主題 : | 請教我的Scriptable Components是哪裡不對 |
我參照了下列兩個網址的步驟成功的使用了Visual Studio 2005 express來編譯出dll也產生出了xpt http://www.iosart.com/firefox/xpcom/ http://starkravingfinkle.org/blog/2006/10/mozilla-platform-xpcom-in-c/ 分別放置到plugins以及components兩目錄 接著使用了regxpcom來註冊元件, 也刪除了xpti.dat, compreg.dat兩檔案, 重新啟動firefox之後卻還是沒辦法使用這兩個元件 請問問題是出在哪裡? 謝謝 元件原始檔 測試網頁 |
發表人: | megaman [ 2007-10-23, 12:11 ] |
文章主題 : | |
而我另外使用了visual studio 6來編譯, 卻得到下面的錯誤訊息 代碼: nsNetutilModule.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) unsigned int __cdecl NS_NewGenericModule2(struct nsModuleInfo *,class nsIModule * *)" (__imp_?NS_NewGenericModule2@@YAIPAUnsModuleInfo@@PAPAVnsIModule@@@Z)
plugin___Win32_Debug/plugin.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. |
發表人: | megaman [ 2007-10-23, 16:46 ] |
文章主題 : | |
自問自答已解決 代碼: Open Visual C++ 6
New / Project / Create an Win32 Dynamic-Link Library project Project / Settings Setting For: Win32 Release C/C++ Category General / append XP_WIN,XP_WIN32,MOZILLA_STRICT_API at Preprocessor definitions Category Precompiled Headers / choose Not using precompiled headers Category Preprocessor / set the value of Additional include directories to C:\cygwin\usr\win32\gecko-sdk\include Link / Category Input append nspr4.lib xpcom.lib xpcomglue_s.lib at Object/library modules set th value of Ignore library\ies to msvcrt.lib set the value of Additional library path to C:\cygwin\usr\win32\gecko-sdk\lib |
第 1 頁 (共 1 頁) | 所有顯示的時間為 UTC + 8 小時 |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |