C++ compilation trouble

Wizzyglvl3

New Member
Reaction score
0
I started doing C++ yesterday and while using Dev-C++ I already had an error. All i did was go to file new project named the project and then when the project was open, i clicked Execute... Compile+Run. Somehow the compilation log came up with 70!!!! errors. I didn't change anything from the original text that starts which is

Code:
#include <iostream>
#include <stdlib.h>

int main(int argc, char *argv[])
{
  
  system("PAUSE");	
  return 0;
}
The error message that pops up is
Code:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing  make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Dev-Cpp/include"  -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/include"  

In file included from main.cpp:1:
C:/Dev-Cpp/include/c++/iostream:44:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:45,

                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,

                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stringfwd.h:44:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/fpos.h:44:24: bits/c++io.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/fpos.h:45,
                 from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cwchar:49:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/fpos.h:60: 'streamoff' is used as a type, but is 
   not defined as a type.
C:/Dev-Cpp/include/c++/bits/fpos.h:74: parse error before `__off'
C:/Dev-Cpp/include/c++/bits/fpos.h:75: missing ';' before right brace
C:/Dev-Cpp/include/c++/bits/fpos.h:77: semicolon missing after declaration of `
   std::fpos<_StateT>'
C:/Dev-Cpp/include/c++/bits/fpos.h: In constructor 
   `std::fpos<_StateT>::fpos()':
C:/Dev-Cpp/include/c++/bits/fpos.h:72: class `std::fpos<_StateT>' does not have 
   any field named `_M_off'
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:77: parse error before `(' token

C:/Dev-Cpp/include/c++/bits/fpos.h:77: ISO C++ forbids defining types within 
   return type
C:/Dev-Cpp/include/c++/bits/fpos.h:77: syntax error before `(' token
C:/Dev-Cpp/include/c++/bits/fpos.h:79: syntax error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:82: syntax error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:86: syntax error before `operator'
C:/Dev-Cpp/include/c++/bits/fpos.h:89: syntax error before `+=' token
C:/Dev-Cpp/include/c++/bits/fpos.h:94: syntax error before `operator'
C:/Dev-Cpp/include/c++/bits/fpos.h:97: syntax error before `-=' token
C:/Dev-Cpp/include/c++/bits/fpos.h:102: parse error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:103: non-member function `bool 
   operator==(...)' cannot have `const' method qualifier
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator==(...)' must have an 
   argument of class or enumerated type
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator==(...)' must take 
   exactly two arguments
C:/Dev-Cpp/include/c++/bits/fpos.h: In function `bool operator==(...)':
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `_M_off' undeclared (first use this 
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h:103: (Each undeclared identifier is reported 
   only once for each function it appears in.)
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `__pos' undeclared (first use this 
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:106: parse error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:107: non-member function `bool 
   operator!=(...)' cannot have `const' method qualifier
C:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=(...)' must have an 
   argument of class or enumerated type

C:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=(...)' must take 
   exactly two arguments
C:/Dev-Cpp/include/c++/bits/fpos.h:110: parse error before `)' token
C:/Dev-Cpp/include/c++/bits/fpos.h:113: `streamoff' was not declared in this 
   scope
C:/Dev-Cpp/include/c++/bits/fpos.h:113: parse error before `)' token
C:/Dev-Cpp/include/c++/bits/fpos.h: In function `void _M_position(...)':
C:/Dev-Cpp/include/c++/bits/fpos.h:113: `__off' undeclared (first use this 
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:114: parse error before `}' token
C:/Dev-Cpp/include/c++/bits/fpos.h:117: syntax error before `;' token

In file included from C:/Dev-Cpp/include/c++/ios:46,
                 from C:/Dev-Cpp/include/c++/ostream:45,

                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/char_traits.h:59: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:60: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:113: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:114: parse error before `;' token

C:/Dev-Cpp/include/c++/bits/char_traits.h: In static member function `static 
   int std::char_traits<char>::eof()':
C:/Dev-Cpp/include/c++/bits/char_traits.h:168: `EOF' undeclared (first use this 
   function)

In file included from C:/Dev-Cpp/include/c++/ios:47,
                 from C:/Dev-Cpp/include/c++/ostream:45,

                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cstdio:49:28: bits/c++config.h: No such file or directory

In file included from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,

                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/localefwd.h:45:28: bits/c++config.h: No such file or directory
C:/Dev-Cpp/include/c++/bits/localefwd.h:46:80: bits/c++locale.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/localefwd.h:48,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cctype:48:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/string:45:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_algobase.h:64:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:67,
                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cstdlib:49:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:72,

                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,

                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/type_traits.h:54:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_iterator_base_funcs.h:68,
                 from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:74,
                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/concept_check.h:40:28: bits/c++config.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
                 from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,

                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:52:23: bits/gthr.h: No such file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
                 from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:

C:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:69: '__gthread_mutex_t' is used as a 
   type, but is not defined as a type.
C:/Dev-Cpp/include/c++/bits/stl_threads.h:79:2: #error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to [email protected].
C:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void 
   std::_Refcount_Base::_M_incr()':
C:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `_M_ref_count_lock' undeclared 
   (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `__gthread_mutex_lock' undeclared 
   (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h:88: `__gthread_mutex_unlock' 
   undeclared (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:158: '__gthread_mutex_t' is used as a 
   type, but is not defined as a type.
C:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void 
   std::_STL_mutex_lock::_M_acquire_lock()':
C:/Dev-Cpp/include/c++/bits/stl_threads.h:192: `_M_lock' undeclared (first use 
   this function)

In file included from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,

                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_alloc.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: syntax error before `;' token
C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: confused by earlier errors, bailing out

make.exe: *** [main.o] Error 1

Execution terminated

I don't know if I just downloaded some of the stuff wrong, or the compiler is broken, or if my computer just won't work. If somebody knows whats going on please help me. If this helps I also had trouble with another compiling program in the past. It was a Newgen 5 World Editor for WC3 I believe. I tried to transfer vJass spells from a game and it always came up with like 1203u89374891798573194759 errors so i just gave up on that.
 

azareus

And you know it.
Reaction score
63
Firstly, don't use Dev-C++. The last I heard of it, it was hopelessly outdated.

Second, in C++ the C include-able files are renamed by putting a c in front of it and removing the .h extension.
E.g.
Code:
#include <stdlib.h>
is
Code:
#include <cstdlib>
 

Wizzyglvl3

New Member
Reaction score
0
Okay then what program should I use? And im not sure if its just the cstdlib thing thats messing it up becuase iv had problems with stuff like this in the past. I think my computer just might not be able to handle any kind of coding
 

Wizzyglvl3

New Member
Reaction score
0
Thats why im starting to think its something thats wrong with my computer. Everyone tells me that this stuff should work perfectly fine, but nothing I try works... I have no idea what to do

EDIT: Okay I don't know if this is just because I changed users, but now its working (I switched to Codeblocks). I think It might have been caused by someone who helps fix my computer, but what they do, while it increases the overall performance of the computer, I think it disables some things. For instance I was once able to host, but then they did something to the computer, and I couldn't anymore.
P.S. does anyone know where to get the newest version of Jass Newgen? I think that with this working, the vjass spell transfers should work.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top