Author Topic: Two simple questions  (Read 8271 times)

Offline TriKri

  • Single posting newcomer
  • *
  • Posts: 6
Two simple questions
« on: March 13, 2008, 02:19:36 pm »
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?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Two simple questions
« Reply #1 on: March 13, 2008, 02:30:07 pm »
By the way, is there a good (functionally and not buggy) debugger in code blocks?
Yes. :D

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?

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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline TriKri

  • Single posting newcomer
  • *
  • Posts: 6
Re: Two simple questions
« Reply #2 on: March 13, 2008, 10:03:38 pm »
By the way, is there a good (functionally and not buggy) debugger in code blocks?
Yes. :D
Thank god, good.

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.

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:

Code
void main() {
}
:)

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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Two simple questions
« Reply #3 on: March 14, 2008, 09:26:55 am »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Two simple questions
« Reply #4 on: March 14, 2008, 01:13:32 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

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Two simple questions
« Reply #5 on: March 14, 2008, 01:16:51 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 ;)

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Two simple questions
« Reply #6 on: March 14, 2008, 06:39:25 pm »
VISTA = Virus Intruders Spyware Trojans and Adware ;)

Hahaha thats a good one!  :lol:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Two simple questions
« Reply #7 on: March 14, 2008, 07:16:45 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Two simple questions
« Reply #8 on: March 14, 2008, 08:11:39 pm »
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.

Offline TriKri

  • Single posting newcomer
  • *
  • Posts: 6
Re: Two simple questions
« Reply #9 on: March 15, 2008, 01:26:17 am »
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? :)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: Two simple questions
« Reply #10 on: March 15, 2008, 08:56:53 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ