Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Pelleschi on July 11, 2011, 04:21:27 pm

Title: Code completion problem
Post by: Pelleschi on July 11, 2011, 04:21:27 pm
Hello,
I inform, i am not well in english, so scuse me !
Before, i solved the problem of the backspace, i have modified the xorg.conf ...
Now, I have a problem with the Code completion, it doesnt work automatically.
In C++, with an object, when i write the ".", it doesnt list all methods of the object, you see ?
Even if i type Ctrl+Backspace it doesnt work ... (but if i type Ctrl+Backspace in front of nothing, it list all type, all object ...)
How can I resolve my problem ?
Thanks !

ps : I am 13 and in france at shcool, the english level is so bad ...
Title: Re: Code completion problem
Post by: ollydbg on July 11, 2011, 04:26:56 pm
welcome!!
please post the sample/test code, and tell us how to reproduce such kind of bug, so that we can fix it.
Also, which version of c::b did you use???
Title: Re: Code completion problem
Post by: Pelleschi on July 11, 2011, 05:50:35 pm
I use Code::blocks 10.05, finally the last release (64 bit, Archlinux).
All example doesnt work with me, in C++, a point (.) after an object doesnt list them methods, you see ?

Title: Re: Code completion problem
Post by: Folco on July 11, 2011, 09:27:03 pm
You can give the code of a sample project which reproduce that please ? I'm french too, that's not so hard to understand :p
Title: Re: Code completion problem
Post by: Pelleschi on July 12, 2011, 12:50:01 pm
Its a default SFML project
Code
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Image Image;
    if (!Image.LoadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Image);
    Sprite. //   /!\ list doesnt appear

// Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Sprite);

        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}
to understand who ?  :mrgreen:
Title: Re: Code completion problem
Post by: Pelleschi on July 13, 2011, 02:23:03 pm
an idea ? :(
Title: Re: Code completion problem
Post by: Manolo on July 13, 2011, 08:17:23 pm
Sometimes I also have this problem :(
Sometimes it gets solved after the file compilation is done :)
Sorry, no more ideas.
HTH
Manolo
Title: Re: Code completion problem
Post by: Pelleschi on August 12, 2011, 01:36:39 pm
It is a bug of code::blocks ?
Title: Re: Code completion problem
Post by: Pelleschi on August 12, 2011, 03:45:05 pm
Good news, code completion work with a personnal class.
It doesnt work with an extern lib (SFML, iostream ...).
Title: Re: Code completion problem
Post by: Freem on August 12, 2011, 04:18:03 pm
Did you add the path somewhere?
Maybe C::B's don't know where to search the headers...

Or maybe try the nigthlies, CC has been greatly improved since 2010.
Title: Re: Code completion problem
Post by: Pelleschi on August 12, 2011, 05:06:25 pm
No i didnt, where i can add it ?
Nightlies, its only for windows no ?
Title: Re: Code completion problem
Post by: Pelleschi on August 12, 2011, 08:04:57 pm
How can I configure "code completion" consider SFML and standar library ?
Thanks !
Title: Re: Code completion problem
Post by: oBFusCATed on August 12, 2011, 08:10:59 pm
We have nightlies for debian/ubuntu.
Or you could build the svn verison. It is way easier on linux.
Title: Re: Code completion problem
Post by: Pelleschi on August 12, 2011, 11:11:06 pm
I have the 7363 SVN version, with the bug too ...
Quote
Did you add the path somewhere?
Maybe C::B's don't know where to search the headers...
Yes probably, where can I add manually the headers please ?
Title: Re: Code completion problem
Post by: ollydbg on August 13, 2011, 04:03:17 am
How can I configure "code completion" consider SFML and standar library ?
Thanks !
I guess mostly SFML library use some special macro definitions, I will check it today and give you the direction.
Title: Re: Code completion problem
Post by: ollydbg on August 13, 2011, 04:47:08 am
I followed this page
http://www.sfml-dev.org/tutorials/1.6/start-cb.php
and works here:(see screen shot)
(http://i683.photobucket.com/albums/vv194/ollydbg_cb/2011-08-13104133.png)
Title: Re: Code completion problem
Post by: Pelleschi on August 13, 2011, 10:04:02 am
(http://img11.hostingpics.net/pics/119719Capture.png)
(http://img11.hostingpics.net/pics/717169Capture1.png)
(http://img11.hostingpics.net/pics/516899Capture3.png)
(http://img11.hostingpics.net/pics/473856Capture5.png)
i have Code::Blocks 7363 svn and archlinux.
Quote
http://www.sfml-dev.org/tutorials/1.6/start-cb.php
its for windows only :s ...
and standard lib didnt list also
Title: Re: Code completion problem
Post by: Pelleschi on August 13, 2011, 07:17:36 pm
after reinstalling codeblocks, code completion work on a local class only.
SFML or other lib didnt auto-complete.
Title: Re: Code completion problem
Post by: ollydbg on August 14, 2011, 05:04:59 am
after reinstalling codeblocks, code completion work on a local class only.
SFML or other lib didnt auto-complete.
I only have Win system, so I can't help you further more. :(
Title: Re: Code completion problem
Post by: Loaden on August 14, 2011, 09:12:27 am
after reinstalling codeblocks, code completion work on a local class only.
SFML or other lib didnt auto-complete.
I only have Win system, so I can't help you further more. :(
Works well on Linux Mint 11.