News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Climits not found

Started by Kamaitachi, July 26, 2010, 10:44:22 PM

Previous topic - Next topic

Kamaitachi

I tried to compile a file and it said that climits wasn't found. I just installed Code::Blocks. Any ideas?

Edit: Forgot. It's Code::Blocks 10.05, with gcc 4.4.1 running on Windows 7 64.

oBFusCATed

Do you have a c++ compiler (g++) installed?

Also read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
And probably you should ask your question in a beginners c/c++ forum.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Kamaitachi

#2
Well, I downloaded the Code::Blocks bundled with MinGW...

EDIT: I was browsing the MinGW installation folder, and I found that, while every other type of file was alright, climits (and all the others) were called simply "Files"... What should I do?

stahta01

Quote from: oBFusCATed on July 27, 2010, 12:22:07 AM
Do you have a c++ compiler (g++) installed?

Also read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
And probably you should ask your question in a beginners c/c++ forum.

Do the above and look at the rebuild log; and, post here the line of code where you do the include.

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

Kamaitachi

This is all that appears in the build log, with the "Full command line" option, when I try to compile a simple "Hello World" program:

C:\Users\Mkh\Documents\C++\Untitled1.c:8: error: `cout' undeclared (first use in this function)
C:\Users\Mkh\Documents\C++\Untitled1.c:8: error: (Each undeclared identifier is reported only once
C:\Users\Mkh\Documents\C++\Untitled1.c:8: error: for each function it appears in.)
Process terminated with status 1 (0 minutes, 0 seconds)
5 errors, 1 warnings




stahta01

Quote from: Kamaitachi on August 06, 2010, 10:43:00 PM
C:\Users\Mkh\Documents\C++\Untitled1.c:8: error: `cout' undeclared (first use in this function)

Please use the extension cpp for C++ files. C::B treats .c files as "C" program files!

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

Kamaitachi

It won't save them as .cpp files...

Jenna

Quote from: Kamaitachi on August 07, 2010, 12:38:57 PM
It won't save them as .cpp files...
You have to give the file-ending on save.

Kamaitachi

*Headdesk* It worked now *facepalm* I'm a idiot  :oops: :oops: Well, sorry >.< Should've checked that out first... Anyway, thank you very much! ^^