User forums > Help

Autocompletion and open #include not working on single file

(1/2) > >>

juraj:
Okay, I pretty much said the whole thing in the subject. If I open a single .cpp file (not a project) in Code::Blocks, I can compile and run it, but code completion and opening #included standard header files doesn't work. Opening fails with ""Warning: Not found: iostream" (for example). Can I set the standard c++ library directory to be searched globally, without the need for a project?

ollydbg:

--- Quote ---If I open a single .cpp file (not a project) in Code::Blocks, I can compile and run it
--- End quote ---
Really? I don't think you can. Codeblocks need a project (cbp) to build and run.

Can you give us some information like: OS, C::B version, Or you code snippet, Compiler version....
Or tell us the steps to reproduce your bug.

Jenna:

--- Quote from: ollydbg on December 14, 2011, 05:38:58 am ---
--- Quote ---If I open a single .cpp file (not a project) in Code::Blocks, I can compile and run it
--- End quote ---
Really? I don't think you can. Codeblocks need a project (cbp) to build and run.

--- End quote ---

No you don't.
A single file is compile dwith the default compiler, just debugging does not work.

juraj:
As Jens has already said, compiling and running does indeed work for single files. It's very useful for educational type programs, which are typically short but numerous and it would be an inconvenience to have to create a new project for each one. And it would be nice to have code completion, opening header files and debugging (as Jens noticed, and I agree) working for single files.

I am using the latest stable version. Steps to reproduce? Well, open a hello world .cpp and try to right click and open <iostream>. Also notice that code completion for standard library classes doesn't work, and that the debugging commands are grayed out.

stahta01:

--- Quote from: juraj on December 14, 2011, 02:30:55 pm ---I am using the latest stable version.

--- End quote ---

Why are there so many people who answer the version number question without giving a version number!!

Tim S.

Navigation

[0] Message Index

[#] Next page

Go to full version