【问题标题】:Can't integrate Mingw to Notepad++无法将 Mingw 集成到 Notepad++
【发布时间】:2013-03-29 11:07:42
【问题描述】:

我尝试将我的记事本++ 集成到之前成功安装的 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

并将其更改为:

// 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

在我的 Notepad++ 中的 Nppexec 插件中

然后当我尝试执行上面的代码时,我收到了这样的消息:

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 就可以了

那么为什么找不到它我不明白...

【问题讨论】:

  • 尝试将$(NAME_PART) 替换为"$(NAME_PART)".exe。但最好避免在目录和/或文件的名称中包含空格。

标签: mingw integration notepad++ nppexec


【解决方案1】:

我在 Notepad++ 中编译的 nppexec 代码是

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

编译文件,在同一文件夹中创建一个.exe文件。

希望对您有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-06-16
    • 2012-02-18
    • 1970-01-01
    • 2013-08-14
    • 2011-10-22
    • 1970-01-01
    • 2018-09-27
    相关资源
    最近更新 更多