News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Two simple questions

Started by TriKri, March 13, 2008, 02:19:36 PM

Previous topic - Next topic

TriKri

Hi!

I haven't used Code::Blocks before, but I thought I am going to try it out. I have been using DevCpp before, but the debugger there is a total mess. Later I changed to wxDevCpp but the debugger was not better there.

By the way, is there a good (functionally and not buggy) debugger in code blocks?

Now I have a couple of questions:

1. When I open a .cpp file, code bocks opens, but it doesn't load the file. I have to open the .cpp file once again for code blocks to really load the file. How can I change that? I have added "cpp", "c" and "h" as wildcards, but it doesn't seem to help.

2. When I try to compile one of my .cpp files, I get the message "Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings", and no exe-file is created. What does it mean?

MortenMacFly

Quote from: TriKri on March 13, 2008, 02:19:36 PM
By the way, is there a good (functionally and not buggy) debugger in code blocks?
Yes. :D

Quote from: TriKri on March 13, 2008, 02:19:36 PM
1. When I open a .cpp file, code bocks opens, but it doesn't load the file.
Cannot reproduce. C::B version, OS... please: More details! Sample file where this happens?

Quote from: TriKri on March 13, 2008, 02:19:36 PM
2. When I try to compile one of my .cpp files, I get the message "Process terminated with status 1 (0 minutes, 0 seconds)
I means that the compiler was run successful (no compiler crash) but it could not produce a file due to error in your code. Check the build log. Again: Sample file? The output directory is usually where the input file is unless you create a project. Where is you input file (full path)?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

TriKri

Quote from: MortenMacFly on March 13, 2008, 02:30:07 PM
Quote from: TriKri on March 13, 2008, 02:19:36 PM
By the way, is there a good (functionally and not buggy) debugger in code blocks?
Yes. :D
Thank god, good.

Quote from: MortenMacFly on March 13, 2008, 02:30:07 PM
Cannot reproduce. C::B version, OS... please: More details! Sample file where this happens?
I can't find the version of Code::Blocks in the about window, it only says "Version: svn build rev 7419", and it's a build from december 10, last year. I run Windows Vista. I recall word have behaved in the same way for a while now every time I have tried to open a document without having word opened. :( But it has to be the programs, cause I don't have the same problem with files opened in other programs than the ms office programs and now code blocks.

Quote from: MortenMacFly on March 13, 2008, 02:30:07 PM
I means that the compiler was run successful (no compiler crash) but it could not produce a file due to error in your code. Check the build log. Again: Sample file? The output directory is usually where the input file is unless you create a project. Where is you input file (full path)?
Okay, here's an example code that leaves the same message:

void main() {
}
:)

Even if this program doesn't do anything, it shouldn't be anything wrong with the code, right?

MortenMacFly

Quote from: TriKri on March 13, 2008, 10:03:38 PM
I run Windows Vista.
I run C::B on Vista, too - all the day. I still cannot reproduce even with the "file" you gave me.
Please do the following:
- Get rid of *all* C::B installation files, including the settings folder under Users\[YOU]\AppData\Roaming\codeblocks (IIRC).
- Remove any additional MinGw compiler you probably have (you may want to do a backup before).
- Install the "grab-it-while-its-hot" C::B release version 08.02 -> the bundle setup that ships with a 100% Vista compatible compiler (the on I use daily... ;-)).
- Install to a folder without spaces (although this is not really required anymore... but thirdparty libs/apps you use might get a hick-up otherwise...).
- Check the configuration of C::B after launching, especially the following parts:
  - compiler plugin: is the tool chain setup correctly (pointing to the MinGW sub-folder of the *new* C::B?)
  - Settings -> Environment -> "General settings" -> is the checkbox "Check and set file assocs" enabled?
  - Settings -> Environment -> "General settings" -> Click on "Manage" -> Are the C/C++ file extensions registered properly (are they active???)

This really should work then.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

JGM

Quote from: TriKri on March 13, 2008, 10:03:38 PM
I can't find the version of Code::Blocks in the about window, it only says "Version: svn build rev 7419", and it's a build from december 10, last year. I run Windows Vista. I recall word have behaved in the same way for a while now every time I have tried to open a document without having word opened. :( But it has to be the programs, cause I don't have the same problem with files opened in other programs than the ms office programs and now code blocks.

You should scan your pc for viruses and spyware :wink: Or maybe the file associations are messed up

Ceniza

Quote from: JGM on March 14, 2008, 01:13:32 PM
You should scan your pc for viruses and spyware :wink:

Completely unnecessary. His Windows is just that... and more: VISTA = Virus Intruders Spyware Trojans and Adware ;)

JGM

Quote from: Ceniza on March 14, 2008, 01:16:51 PM
VISTA = Virus Intruders Spyware Trojans and Adware ;)

Hahaha thats a good one!  :lol:

MortenMacFly

Quote from: JGM on March 14, 2008, 06:39:25 PM
Quote from: Ceniza on March 14, 2008, 01:16:51 PM
VISTA = Virus Intruders Spyware Trojans and Adware ;)
Hahaha thats a good one!  :lol:
Bah! I *love* Vista. Most stable and secure Windows ever. You need some time to get used to some annoyances but those will be fixed in SP1, too. Anyways... we are getting completely OT. Let's get back to what matters.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

JGM

Well to continue on the topic, my new acer labtop came with Vista Home Premium, and works perfectly fine with the 8.02 codeblocks bundle release. Haven't tested on it deeply since I use the labtop more to read electronic books and write, but neither of those problems happened to me.

TriKri

So, I'm gonna uninstall codeblocks, try to remove it completely including the folder C:\Users\[ME]\AppData\Roaming\codeblocks, then remove the MinGw compilers, which are? VS comes with any? DevCpp/WxDevCpp? Then install Codeblocks again from the newest available installation file.

Just to make sure, the program to open the files with is C:\Program Files\CodeBlocks\codeblocks.exe, right? :)

MortenMacFly

Quote from: TriKri on March 15, 2008, 01:26:17 AM
then remove the MinGw compilers, which are?
- VS comes with any?
- DevCpp/WxDevCpp?
VS: No. DevCpp/wxDevCpp: If you installed the bundle package including MinGW then yes, but it might be enough to just temporarily rename those folders. I want to make sure that C::B does not autodetect any other compiler than the one the C::B bundle setup installs. You can verify this setting as I said: Within the compiler options under "tool chain".
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]