Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
Help / Re: Project parser completes, nohing displayed in "symbols" window
« Last post by ravenspoint on October 19, 2017, 03:43:14 pm »
Does goto definition or goto declaration work?

Sorry, I do not know what this means.  I never use goto statements in my code.

Does it work for simple projects?

Yes.  As I said: "As my project grows in complexity, more and more frequently the symbols window fails..."
42
Help / Re: Go to word end instead begin of next word - Key bindings
« Last post by ikk_ on October 19, 2017, 02:44:17 pm »
Actually, i made a mistake, both Windows and Linux versions work the same way regarding that ctrl+right functionality.
I'm sorry,  it must have been some other text editor that caused my confusion.
I checked new C::B windows build as well (20171003 rev11182 win32).

If anything, I would like to know if there is possibility to make C::B text editor behave in that other way (ctrl+right: go to word end first, not to next word)?
43
Help / Re: Making pretty printers for gdb
« Last post by visir on October 19, 2017, 08:37:13 am »
I have no idea what I'm doing

pig-gdb.py:

Code: [Select]

import gdb



def real_to_string(self):
    # print self.val
    return self.val['list']['items'].string()


def real_lookup_type(val):
    # print val.type
    # print 'fsjodifsiohfiosehfoshifhioehsfihseiofhs'
    if str(val.type) == 'Buf':
        print '!!!!!!!!!!!!!!!!!!!!!!!'
        return BufPrinter(val)
    else:
        print '======================='
    return None





class BufPrinter:
    def __init__(self, val):
        self.val = val

    def to_string(self):
        return real_to_string(self)

def lookup_type (val):
    return real_lookup_type(val)

gdb.pretty_printers.append(lookup_type)

Code: [Select]
python execfile("pig-gdb.py")
Spam this until it works:

p.py:

Code: [Select]
def real_to_string(self):
    # print self.val
    return '"' + self.val['list']['items'].string() + '"'


def real_lookup_type(val):
    # print val.type
    # print 'fsjodifsiohfiosehfoshifhioehsfihseiofhs'
    if str(val.type) == 'Buf':
        # print '!!!!!!!!!!!!!!!!!!!!!!!'
        return BufPrinter(val)
    # else:
    #     print '=======================>'
    #     print val.type
    #     print '<======================='
    return None

Code: [Select]
python execfile("p.py")
This worked, but for some reason it doesn't autoload. Well, I guess copypasting an extra line at every debug session isn't that bad. Any ideas?
44
Using Code::Blocks / Re: OpenGL using gl/glut.h header file
« Last post by blauzahn on October 19, 2017, 06:53:58 am »
Have you tried the wizard (file | new | project | opengl project)?
45
Using Code::Blocks / Re: OpenGL using gl/glut.h header file
« Last post by stahta01 on October 19, 2017, 03:39:07 am »
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Post a full re-build log.
And, post your compiler version.

Edit: I suggest you find a support site for the Compiler you are using; since, it sounds like your instructor does not wish to support MinGW GCC. And, this site does not support any compiler.

Tim S.
46
Using Code::Blocks / OpenGL using gl/glut.h header file
« Last post by biotech54 on October 19, 2017, 03:12:12 am »
I'm trying to get a simple openGL program to compile.  I read a prior post that i needed to add dll, header, and lib files, and i thought i did it correctly.  All the directories have changed since this post 12 years ago.  I still cannot get it to compile.  We are using the gl/glut.h header file.  I'm taking a class at a local university on OpenGL.  I asked my professor if he could figure out how to use codeblocks, and he tried for 15 minutes, and couldnt figure it out.  He advised me to abandon codeblocks and use visualstudio instead.  I would prefer to use codeblocks if possible.

I'm using windows 7, compiling with GCC compiler, C language.

I tried getting openMP to work with codeblocks recently without any luck, despite help from this forum.  I spent 6 weeks studying openMP, couldn't get a simple hello world program to compile, which really sucks.  I'm hoping this won't be a repeat.

This is the simple program, given by the professor.  Compiler error gives "undefined reference to" all the opengl functions.
Any help is appreciated:

#include <gl/glut.h>      // (or others, depending on the system in use)

void init (void)
{
    glClearColor (1.0, 1.0, 1.0, 0.0);  // Set display-window color to white.

    glMatrixMode (GL_PROJECTION);       // Set projection parameters.
    gluOrtho2D (0.0, 200.0, 0.0, 150.0);
}

void lineSegment (void)
{
    glClear (GL_COLOR_BUFFER_BIT);  // Clear display window.

    glColor3f (0.0, 0.0, 1.0);      // Set line segment color to red.
    glBegin (GL_LINES);
        glVertex2i (180, 15);       // Specify line-segment geometry.
        glVertex2i (10, 145);
    glEnd ( );

    glFlush ( );     // Process all OpenGL routines as quickly as possible.
}

void main (int argc, char** argv)
{
    glutInit (&argc, argv);                         // Initialize GLUT.
    glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);   // Set display mode.
    glutInitWindowPosition (50, 100);   // Set top-left display-window position.
    glutInitWindowSize (400, 300);      // Set display-window width and height.
    glutCreateWindow ("An Example OpenGL Program"); // Create display window.

    init ( );                            // Execute initialization procedure.
    glutDisplayFunc (lineSegment);       // Send graphics to display window.
    glutMainLoop ( );                    // Display everything and wait.
}


47
Help / Re: Project parser completes, nohing displayed in "symbols" window
« Last post by oBFusCATed on October 18, 2017, 11:53:07 pm »
Yes, I saw that...

Does goto definition or goto declaration work?
Does it work for simple projects?
48
Help / Re: Project parser completes, nohing displayed in "symbols" window
« Last post by ravenspoint on October 18, 2017, 11:13:07 pm »
It does not crash, just shows nothing.  Please take a look at the screenshot I posted.
49
Use a night build, the problem is fixed there.

If you've searched your distro's bug tracker (launchpad) you would have found the same report of the issue and how to fix it.
If you want this fixed in the official builds (16.01) then you need to bring this problem to the attention of your distro maintainers...

I've done what is up to us as upstream...
50
Ubuntu 16.04, 64

I installed CB from apt-get and after opening several documents, and closed them
navigating on a project, the tabs for files stopped repainting.

I also built CB from code-blocks_16.01.tar.gz and behaves the same.

This behavior started roughly  11 months ago. I keep coming back from time to time
to check it, and still  the same.



Pages: 1 2 3 4 [5] 6 7 8 9 10