2013-04-13 120 views
0

我試圖使用NSIS功能StrStr的功能,但我得到以下錯誤:多少參數做的strstr需要

!insertmacro: macro "FUNCTION_STRING_StrStr" requires 0 parameter(s), passed 3!

documentation指定您是爲了傳遞3個參數,這個功能,與上面的編譯錯誤相反。

那麼有多少參數做我使用的NSIS功能StrStr

我的代碼:

!include "StrFunc.nsh" 
!include "LogicLib.nsh" 


InstallDir "abc" 
Name  "def"   
OutFile  "def.exe" 

Section 
    ${StrStr} $R9 "How to find it" "find it" 
SectionEnd 
+1

您可能希望[這裏完整的示例]檢查(http://nsis.sourceforge.net/StrFunc)。 –

+0

你已經基本上問同樣的問題,現在的3倍,爲什麼你能不能,而不是編輯您的老問題?請只接受作者:Matt吉布森回答,繼續前進...... – Anders

回答

3

這兩個文件和編譯器錯誤是正確的。根據上下文,StrStr接受零參數和三個參數。第一次看到,沒有任何爭論,使它的使用。鑑於example in the StrFunc文件,我想嘗試:

!include "StrFunc.nsh" 
!include "LogicLib.nsh" 

${StrStr} # Supportable for Install Sections and Functions 

InstallDir "abc" 
Name  "def"   
OutFile  "def.exe" 

Section 
    ${StrStr} $R9 "How to find it" "find it" 
SectionEnd 
+0

您已經發布不再起作用的聯繫,所以不存在這樣的例子諮詢... – kdmin

+0

@kdmin作品鏈接對我蠻好。 –

+0

這一次似乎是正確的:http://nsis.sourceforge.net/StrStr – kdmin