2013-03-29 20 views
0

我嘗試將我的記事本++集成到之前成功安裝的mingw應用程序。我得到的幫助來自這個網站:無法將Mingw集成到記事本++

http://iitdu.forumsmotion.com/t108-gcc-compiler-in-notepad

我把代碼從該網站爲:

// The script code, C source code compiling with GNU CC (GCC) in notepad++ (by    "NppExec" plug-in) and compressing with UPX... 
// 
// Enable? "//" signs remove in code line. 
// Sample: C:\Program Files\CodeBlocks\MinGW\bin\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART) 

YOUR_GCC\BIN\_PATH_HERE\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART) 

// UPX Compress (with "--best, --ultra-brute" options) 
// Enable? "//" signs remove in code line. 
// Sample: C:\WINDOWS\system32\upx.exe --best --ultra-brute $(NAME_PART).exe 

YOUR_UPX_PATH_HERE\upx.exe --best --ultra-brute $(NAME_PART).exe 

,並改變它爲:在記事本中我Nppexec插件

// The script code, C source code compiling with GNU CC (GCC) in notepad++ (by "NppExec" plug-in) and compressing with UPX... 
// 
// Enable? "//" signs remove in code line. 
// Sample: C:\MinGW\bin\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART) 

C:\MinGW\bin\gcc.exe "$(FULL_CURRENT_PATH)" -o $(NAME_PART) 

// UPX Compress (with "--best, --ultra-brute" options) 
// Enable? "//" signs remove in code line. 
// Sample: C:\upx.exe --best --ultra-brute $(NAME_PART).exe 
C:\upx.exe --best --ultra-brute $(NAME_PART).exe 

++

然後當我嘗試執行我剛剛上面的c頌我把這樣的消息:

C:\MinGW\bin\gcc.exe "C:\Program Files\Notepad++\new 3.txt" -o new 3 
Process started >>> 
**gcc.exe: hata: 3: No such file or directory** 
<<< Process finished. 
C:\upx.exe --best --ultra-brute new 3.exe 
Process started >>> 
         Ultimate Packer for eXecutables 
          Copyright (C) 1996 - 2013 
UPX 3.09w  Markus Oberhumer, Laszlo Molnar & John Reiser Feb 18th 2013 

     File size   Ratio  Format  Name 
    -------------------- ------ ----------- ----------- 
upx: new: FileNotFoundException: new 
upx: 3.exe: FileNotFoundException: 3.exe 

Packed 0 files. 
<<< Process finished. 
================ READY ================ 

在我MinGW的文件夾:

C:\ MinGW的\ BIN \ gcc.exe是確定

那麼,爲什麼它不能找到它,我不明白...

+0

嘗試用'「$(NAME_PART)」.exe'替換'$(NAME_PART)'。但最好避免在目錄和/或文件的名稱中包含空格。 –

回答

1

我的記事本內++編譯代碼nppexec是

gcc $(FULL_CURRENT_PATH) -o $(CURRENT_DIRECTORY)\$(NAME_PART).exe 

這編譯文件,請在同一個文件夾中創建一個.exe文件。

希望有所幫助。