Here's how I use it:

nsCString theSpec;
nsCOMPtr<nsIURI> theURI;

theSpec = UrlTable[i].theUrl;  // char * url from a table
rv = NS_NewURI(getter_AddRefs(theURI), theSpec.get());

- david

jianfengguo wrote:

> Hi,everybody.
> 
> I am testing GtkMozembed now. Used NS_NewURI api : 
>    nsCAutoString s(url);      
>    nsCOMPtr<nsIURI> linkURI;  
>    NS_NewURI(getter_AddRefs(linkURI), s);  
> It is right when compiling.but wrong when linking.
> Here is link wrong message:
>    In function 'nsAFlatCString type_info function':
> 
>/usr/include/mozilla/cpcom/nsIServiceManager.h(.gnu.linkonce.t.__tf14nsAFlatCString+0x11):
> undefine reference to 'nsASingleFragementCString type_info function'
> /usr/include/mozilla/xpcom/nsIServiceManager.h(.gnu.linkonce.t.__tf14nsAFlatC 
>String+0x17):undefined reference to 'nsASingleFragementCString type_info node'
> 
>   Could you tell me the wrong reason ?
>   and tell me how to use NS_NewURI api?
>   
>  Thanks in advance!
>  Have a good day!
> 
> 
> 
> 
> 
> 
> 
> ===================================================================
> ������ѵ������� (http://mail.sina.com.cn)
> ���˷�����Ϣ�������г���һ�ߣ��ó���ʱ�ͳ��֣� (http://classad.sina.com.cn/2shou/)
> 
> 
> 


Reply via email to