Thread: unknown compilation error

  1. #1
    Registered User
    Join Date
    Nov 2017
    Posts
    30

    unknown compilation error

    I have written a code and after I compiled it I get a huge error message. I afterwards closed the terminal and when I tried it again, there was no more error. The strange thing is, that it didn't even compile because when I try to run the programm, I get: "the command is either misspelled or could not be found". I also was not able to create an exe file, even when I try to run a simple code. Does anyone have a idea how to fix this problem?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    On the little information you posted, all I can suggest is rebooting your computer to unlock files.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  3. #3
    Registered User
    Join Date
    Nov 2017
    Posts
    30
    Rebooting my computer didn't work out. I would like to give you more informations but I don't know more either. I only can tell you that I'm using Windows 10 and a Mingw compiler.

  4. #4
    Registered User
    Join Date
    Nov 2017
    Posts
    30
    I now set my system environment variable to C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32 \Wbem;. The terminal now recognizes commands like ping, but still isn't able to compile.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Where did you install the MinGW GCC compiler?

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Registered User
    Join Date
    Nov 2017
    Posts
    30
    The file MinGW is in C:\

  7. #7
    Registered User
    Join Date
    Jun 2017
    Posts
    157
    Try adding to following paths to the PATH
    C:\MinGW\bin
    C:\MinGW\include
    C:\MinGW\lib

  8. #8
    Registered User
    Join Date
    Nov 2017
    Posts
    30
    It's still not working. However I recognized that it creats a text file. It's a very long text so her's the fitsz few lines:

    Code:
    # 1 "te.cpp"
    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1 "te.cpp"
    # 1 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\iostream" 1 3
    # 36 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\iostream" 3
           
    # 37 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\iostream" 3
    
    
    # 1 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 1 3
    # 194 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 3
    
    
    # 194 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 3
    namespace std
    {
      typedef unsigned int size_t;
      typedef int ptrdiff_t;
    
    
    
    
    
    
    
    
    }
    # 216 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 3
    namespace std
    {
      inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
    }
    namespace __gnu_cxx
    {
      inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
    }
    # 482 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 3
    # 1 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\os_defines.h" 1 3
    # 483 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 2 3
    
    
    
    
    # 1 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\cpu_defines.h" 1 3
    # 486 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32\\bits\\c++config.h" 2 3
    # 39 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\iostream" 2 3
    # 1 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\ostream" 1 3
    # 36 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\ostream" 3
           
    # 37 "c:\\mingw\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\ostream" 3
    
    
    te is the name of my test programm.

  9. #9
    Registered User
    Join Date
    Jan 2018
    Posts
    7
    Did you try latest mingw there is two revisions recomended now TDM-GCC and MinGW-64

    Last edited by jeruka9; 01-04-2018 at 10:32 AM. Reason: info

  10. #10
    Registered User
    Join Date
    Nov 2017
    Posts
    30
    No. I didn't want to install the compiler new because it worked well bevor two days. I just don't understand why it's not working suddenly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error: was not declared in this scope compilation error
    By i_r_tomash in forum C Programming
    Replies: 2
    Last Post: 05-27-2010, 07:44 AM
  2. Help, getting unknown error
    By halien in forum C Programming
    Replies: 11
    Last Post: 01-28-2010, 07:13 PM
  3. Unknown error...
    By yaya in forum C++ Programming
    Replies: 8
    Last Post: 07-11-2007, 03:14 AM
  4. Unknown error in compilation
    By mbooka in forum C Programming
    Replies: 7
    Last Post: 04-08-2006, 11:07 AM
  5. unknown error!
    By black_sol in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2004, 06:51 PM

Tags for this Thread