Sinisterly
Configuring Notepad++ plugin [nppExec] with GCC - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Coding (https://sinister.ly/Forum-Coding--71)
+--- Thread: Configuring Notepad++ plugin [nppExec] with GCC (/Thread-Configuring-Notepad-plugin-nppExec-with-GCC)



Configuring Notepad++ plugin [nppExec] with GCC - alok9shm - 06-05-2014

Hi there, I'm trying to configure the NppExec plugin in Notepad++ so that it will compile and run my C programs using the Gcc compiler.

Here is the Execute Command that I'm using:
Code:
npp_save cd "$(D:\MinGW-4.8.1\bin\)" //That's where Gcc resides in my system. cmd /c del "$(NAME_PART)".o "$(NAME_PART)".exe *.o gcc -o $(NAME_PART) $(FILE_NAME) npp_run "$(NAME_PART)".exe

A sample run gives this Message:
Quote:Current directory: C:\Program Files (x86)\npp.6.5.4.bin
cmd /c del "terminate".o "terminate".exe *.o
Process started >>>
Could Not Find C:\Program Files (x86)\npp.6.5.4.bin\terminate.o
<<< Process finished. (Exit code 0)
gcc -o terminate terminate.c
CreateProcess() failed with error code 2:
The system cannot find the file specified.

NPP_RUN: "terminate".exe
- the specified file was not found
================ READY ================

Is there anything wrong with my command?


RE: Configuring Notepad++ plugin [nppExec] with GCC - chmod - 06-05-2014

I'm not a notepad++ user but judging from the output it would appear that you forgot to navigate to your working directory and as such gcc is still looking in C:\Program Files (x86)\npp.6.5.4.bin\ for your source file.


RE: Configuring Notepad++ plugin [nppExec] with GCC - alok9shm - 06-07-2014

(06-05-2014, 05:15 PM)chmod Wrote: I'm not a notepad++ user but judging from the output it would appear that you forgot to navigate to your working directory and as such gcc is still looking in C:\Program Files (x86)\npp.6.5.4.bin\ for your source file.

Quote:Current directory: C:\Program Files (x86)\npp.6.5.4.bin <------
cmd /c del "terminate".o "terminate".exe *.o
Process started >>>
Could Not Find C:\Program Files (x86)\npp.6.5.4.bin\terminate.o
<<< Process finished. (Exit code 0)
gcc -o terminate terminate.c
CreateProcess() failed with error code 2:
The system cannot find the file specified.

NPP_RUN: "terminate".exe
- the specified file was not found

I think this did not work in my command:
Quote:npp_save
cd "$(D:\MinGW-4.8.1\bin\)"



RE: Configuring Notepad++ plugin [nppExec] with GCC - alok9shm - 06-07-2014

(06-07-2014, 04:53 AM)alok9shm Wrote: I think this did not work in my command:
Quote:npp_save
cd "$(D:\MinGW-4.8.1\bin\)"

Yes! I used a wrong Syntax.
cd "D:\MinGW-4.8.1\bin\" instead of cd "$(D:\MinGW-4.8.1\bin\)" worked out for me. Removed Braces an $ prefix, and it worked like a charm.
Thanks for the concern @chmod