Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Blanchy on July 12, 2007, 01:48:18 pm

Title: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 01:48:18 pm
Hi,

Been using code::blocks for a few hours now and it's probably the best c/c++ editor I've tried so far  8)

One or two things though, I'm able to compile projects fine, but if I open an individual file (ie outside of a file), how can I compile it
from witihn code::blocks? Pressing the compile button will simply compile the existing project in the workspace.

Also, I've Java and Eclipse a fair bit before and it has a neat feature where by if you were to do the following:

Code
string s;
s.

it would then present you with the list of functions that you call on the string s, is there anyway you can get code::blocks to do the same with C++? (it already does a similar thing if you have a struct, by showing you a list of variables that are in the struct)

Thanks
Title: Re: Compiling opened files + library lookup
Post by: JGM on July 12, 2007, 03:15:02 pm
One or two things though, I'm able to compile projects fine, but if I open an individual file (ie outside of a file), how can I compile it
from witihn code::blocks? Pressing the compile button will simply compile the existing project in the workspace.

Well, closing all or the active project and opening an stand alone file.cpp should work when pressing the build button.

Also, I've Java and Eclipse a fair bit before and it has a neat feature where by if you were to do the following:

Code
string s;
s.

it would then present you with the list of functions that you call on the string s, is there anyway you can get code::blocks to do the same with C++? (it already does a similar thing if you have a struct, by showing you a list of variables that are in the struct)

codeblocks already have a code completion plugin.
Title: Re: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 03:54:25 pm
I've looked in plugins and the code completion box is ticked.

How powerful is it though, for instance the example I posted above to do with strings isn't working.
Title: Re: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 04:00:17 pm
Also, is it possible for code::blocks to remeber the text size I like?

Every time I open it the text is quite small, so I have to use CTRL + mouse roller to increase the text size/zoom in.
Title: Re: Compiling opened files + library lookup
Post by: mandrav on July 12, 2007, 04:01:52 pm
I've looked in plugins and the code completion box is ticked.

How powerful is it though, for instance the example I posted above to do with strings isn't working.

The file must belong to a project.
Title: Re: Compiling opened files + library lookup
Post by: JGM on July 12, 2007, 04:02:37 pm
I've looked in plugins and the code completion box is ticked.

How powerful is it though, for instance the example I posted above to do with strings isn't working.

It has some limitations with namespaces, but std::string. brings the correct listing. The author is working hard on it.
Title: Re: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 04:11:23 pm
Also, is it possible for code::blocks to remeber the text size I like?

Every time I open it the text is quite small, so I have to use CTRL + mouse roller to increase the text size/zoom in.

Don't worry - found out.
Title: Re: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 04:12:49 pm
I've looked in plugins and the code completion box is ticked.

How powerful is it though, for instance the example I posted above to do with strings isn't working.

It has some limitations with namespaces, but std::string. brings the correct listing. The author is working hard on it.

K thanks.
Title: Re: Compiling opened files + library lookup
Post by: Blanchy on July 12, 2007, 04:18:29 pm
Now my build and run icons seem locked out :-(

I can compile fine using CTRL + F9 or by navigating Build -> compile, but the icon does nothing when I click on it.

Is this a known issue or I have I done something wrong?