Author Topic: MinGW Compile Errors  (Read 18309 times)

Offline Pinyateh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: MinGW Compile Errors
« Reply #15 on: December 30, 2014, 07:54:56 pm »
Removing the path, changes nothing, we still get the initial error from the beginning. Here's the build log from Tim's project:

Quote
Running project pre-build steps
CMD /C where where
C:\Windows\System32\where.exe
CMD /C REM TARGET_COMPILER_DIR
CMD /C echo C:\CodeBlocks\MinGW\
C:\CodeBlocks\MinGW\
CMD /C REM TARGET_CC
CMD /C where mingw32-gcc.exe
C:\CodeBlocks\MinGW\bin\mingw32-gcc.exe
CMD /C REM TARGET_CPP
CMD /C where mingw32-g++.exe
C:\CodeBlocks\MinGW\bin\mingw32-g++.exe

-------------- Build: default in testgcc win (compiler: GNU GCC Compiler)---------------

Target is up to date.
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

-------------- Run: default in testgcc win (compiler: GNU GCC Compiler)---------------

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: MinGW Compile Errors
« Reply #16 on: December 30, 2014, 08:05:11 pm »
Please post the build log that contains the error.
Please do a re-build (of the project that has the error) to create the build log.

Edit2: Do NOT do build and run!

Tim S.
« Last Edit: December 30, 2014, 08:07:10 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pinyateh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: MinGW Compile Errors
« Reply #17 on: December 30, 2014, 08:22:30 pm »
Actually what I posted is the build log (for your project). There is no error. I built it again but this time I didn't run it, and got the same thing:

Quote
Running project pre-build steps
CMD /C where where
C:\Windows\System32\where.exe
CMD /C REM TARGET_COMPILER_DIR
CMD /C echo C:\CodeBlocks\MinGW\
C:\CodeBlocks\MinGW\
CMD /C REM TARGET_CC
CMD /C where mingw32-gcc.exe
C:\CodeBlocks\MinGW\bin\mingw32-gcc.exe
CMD /C REM TARGET_CPP
CMD /C where mingw32-g++.exe
C:\CodeBlocks\MinGW\bin\mingw32-g++.exe

-------------- Build: default in testgcc win (compiler: GNU GCC Compiler)---------------

Target is up to date.
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

As for the original project, with default settings, this is the error of the build:

Quote
-------------- Build: Debug in CppLearning (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -fexceptions -g  -c C:\CodeBlocks\Projects\CppLearning\main.cpp -o obj\Debug\main.o
mingw32-g++.exe: error: CreateProcess: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Edit: I think I misunderstood what you were saying, but still provided what you were asking for Stah, the top build log it of your project, and the bottom build is of a default hello world project.
« Last Edit: December 30, 2014, 08:25:06 pm by Pinyateh »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: MinGW Compile Errors
« Reply #18 on: December 30, 2014, 08:25:54 pm »
This thread started with you saying you had a error.

Try running this from the command line
Code
C:\CodeBlocks\MinGW\bin\mingw32-g++.exe -v

Edit: If that works try the below from the command line.
Code
CD /d C:\CodeBlocks\Projects\CppLearning
C:\CodeBlocks\MinGW\bin\mingw32-g++.exe  -Wall -fexceptions -g  -c C:\CodeBlocks\Projects\CppLearning\main.cpp -o obj\Debug\main.o

Tim S.
« Last Edit: December 30, 2014, 08:34:03 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pinyateh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: MinGW Compile Errors
« Reply #19 on: December 30, 2014, 08:37:01 pm »
I do have an error, that's why I added the edit saying I misunderstood what you were asking for. Anyway here is the output log from the command you told me to input, I ran it from my desktop, if that's a problem I can run it again.

http://surrr.net:8080/output.png

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: MinGW Compile Errors
« Reply #20 on: December 30, 2014, 08:39:40 pm »
Now try the second command since the first one worked.
Code
CD /d C:\CodeBlocks\Projects\CppLearning
C:\CodeBlocks\MinGW\bin\mingw32-g++.exe  -Wall -fexceptions -g  -c C:\CodeBlocks\Projects\CppLearning\main.cpp -o obj\Debug\main.o

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pinyateh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: MinGW Compile Errors
« Reply #21 on: December 30, 2014, 08:44:34 pm »
Good old,

Quote
mingw32-g++.exe: error: CreateProcess: No such file or directory

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: MinGW Compile Errors
« Reply #22 on: December 30, 2014, 09:10:38 pm »
Good old,

Quote
mingw32-g++.exe: error: CreateProcess: No such file or directory

So, we have confirmed it is NOT a Code::Blocks based error.

The likely things are Windows setting, anti virus setting, or a MinGW GCC bug.

Edit:

Windows setting are security and permission issues; you might try using a Admin command window and see if error goes away.
anti virus setting: You might try turning off the AV software and see if error goes away.
MinGW GCC bug: search with the Windows version and mingw version for bugs.

Tim S.
« Last Edit: December 30, 2014, 09:16:21 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pinyateh

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: MinGW Compile Errors
« Reply #23 on: December 30, 2014, 11:52:42 pm »
Thank you everyone for your help, and I bring settling news, I fixed it!! There was some environmental variable called "GCC_EXEC_PREFIX" and after deleting that, everything works! God simple solutions are always missed.