Evan wrote:
> Doug Turner wrote:
> 
>> 1.    Create a new Project of type �Win32 Dynamic-Link Library�
>> 2.    Select �An empty DLL project.� In the wizard.
>> 3.    Select ok to confirm your choices.
>> 4.    Under project settings/Link, add the following libraries to your 
>> Object/library modules:
>>     a.    xpcomglue.lib
>>     b.    string_s.lib
>>     c.    string_obsolete_s.lib
>> 5.    Under Category �Input�, add a path to where these libraries can 
>> be found.  For example, c:\mozilla\dist\bin\lib\
>> 6.    Under the C/C++ panel, select Category Preprocessor and include 
>> a patch to where the Mozilla includes can be found.  For example, 
>> ..\..\..\..\..\dist\include\xpcom,..\..\..\..\..\dist\include\nspr
>> 7.    Under this same panel, Add the following defines:
>>     a.    XP_WIN
>>     b.    XP_WIN32
>> 8.    Follow the xpcom/sample code to create a new module
> 
> 
> I only had a few problems with these steps.  First, I got a strange 
> linking error:
> 
> error LNK2001: unresolved external symbol "__declspec(dllimport) 
> unsigned int __cdecl NS_NewGenericModule2(struct nsModuleInfo *,class 
> nsIModule * *)" 
> (__imp_?NS_NewGenericModule2@@YAIPAUnsModuleInfo@@PAPAVnsIModule@@@Z)
> 
> This was resolved by linking in xpcom.lib.

I am not seeing this link error.  what mozilla libraries are you 
currently linking against?


> Also, the defines found in nsError.h didn't seem to be included.  A 
> NS_SUCCEEDED() passed when it shouldn't have.  Including that header 
> solved the problem.

I will fix up the includes soon.

> 
> Other than this, the component loaded and functioned properly.
> 
> -e
> 
> 


Reply via email to