Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Umm, i didn't understand what you meant. Could you explain a little bit? What 64 bit library should i install?
This library is too old in all meanings.
If you want to use it you have to find sources and rebuild it with you version of the wingw compiler. It may not works, or requires some additional efforts, if  it was coded in low standard levels.
There is another version: https://openbgi.sourceforge.net/ - also very old.
Please note that actually it is from 80th.  https://en.wikipedia.org/wiki/Borland_Graphics_Interface 
It is too old for practical usage or for the learning.

PS. https://github.com/ahmedshakill/WinBGIm-64  - 64b version, should be more or less fresh.
2
Is there any way to manually provide lbgi to solve the error? if not, what should i do now?
3
Install an 64 bit library to use with your 64 bit toolchain or install an 32 toolchain to use with your 32 bit library.

Tim S.
Very likely it not help, because "Library built with MingW 5.0.3 and GCC 3.4.5" (c)
4
Umm, i didn't understand what you meant. Could you explain a little bit? What 64 bit library should i install?
5
Install an 64 bit library to use with your 64 bit toolchain or install an 32 toolchain to use with your 32 bit library.

Tim S.
6
I need to install graphics.h for doing graphics programming in C. however, even after following the steps mentioned here: https://stackoverflow.com/questions/20313534/how-to-use-graphics-h-in-codeblocks/20321173#20321173
I am not able to build and run programs because it shows
Code
||=== Build file: "no target" in "no project" (compiler: unknown) ===|
ld.exe||cannot find -lbgi|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
How do i solve the issue of cannot finding lbgi? I already have added -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 in Other Linker options while assigned the directory C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a for Link libraries.

This is the build message i am getting:
Code
gcc.exe   -c C:\Users\imran\OneDrive\Documents\Codeblocks\practice.c -o C:\Users\imran\OneDrive\Documents\Codeblocks\practice.o
gcc.exe  -o C:\Users\imran\OneDrive\Documents\Codeblocks\practice.exe C:\Users\imran\OneDrive\Documents\Codeblocks\practice.o  -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32  "C:\Program Files\CodeBlocks\MinGW\lib\libbgi.a"
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib\libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib\libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib\libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../..\libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../libbgi.a when searching for -lbgi
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lbgi
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
2 error(s), 0 warning(s) (0 minute(s), 1 second(s))

Will be grateful for some assistance
7
Development / Re: %I64d or %lld in the plugins\compilergcc\depslib\src\cache.c
« Last post by ollydbg on Yesterday at 02:27:42 pm »
Try the following:
      #if  (_USE_LONG_TIME_T)
         sscanf(buf, "%ld %n", &timeval, &n);
      #else
         #if defined(PRId64)
            sscanf(buf, "%" PRId64 " %n", &timeval, &n);
         #else
            sscanf(buf, "%lld %n", &timeval, &n);
         #endif
      #endif

and
      #if  (_USE_LONG_TIME_T)
         fprintf(f, "%ld %s\n", h->time, h->file);
      #else
         #if defined(PRId64)
            fprintf(f, "%" PRId64 " %s\n", h->time, h->file);
         #else
            fprintf(f, "%lld %s\n", h->time, h->file);
         #endif
      #endif

This works better than the existing code. Give it a quick hack/ try, but you may find a better way.

Hi, thanks, I just tested it. I think your suggested code is better than the current code.  :)
8
Using Code::Blocks / Re: Hiccups while typing (continuation)
« Last post by ollydbg on Yesterday at 03:09:40 am »
Quote
Any change made while no project is active gets written to .conf

I agree, this include the m_Options and the m_BrowserOptions.

Quote
When a project is loaded nothing has changed in .conf, so no write options need to be done.

I agree.

Quote
If changes are made to settings (OnApply is entered), the active parser that made the changes is recorded by OnApply().
Those changes are then written to the .conf, and only the settings made by that active project are written to the .conf.
all other projects read those settings.

I agree that the writing of m_Options to the configure file should only happens inside the OnApply() function.
When user tweak the Class browser GUI options, it should always to saved to configure file.

But, I think the last sentence ("all other projects read those settings") is not correct. When we switch the Parser, the other Parser should read the m_BrowserOptions, because this is a global setting.
But we don't need to "re-read" the m_Options from the configure file, because different Parsers may have different parsing options.


Quote
If no user setting are made via settings, no need to care about writing the .conf.
I agree.
9
Using Code::Blocks / Re: Hiccups while typing (continuation)
« Last post by ollydbg on Yesterday at 02:56:14 am »
I can't find a "Class browser's option. Where is that?
I can possible make those options "always write" if I could figure out where that is.

If you look at this function: void Parser::WriteOptions(), you will see that it actually save two member variables: one is the m_Options, and the other is the m_BrowserOptions.
In my mind, it looks like the "m_BrowserOptions" is shared by all the Parser instances. But the "m_Options" is not, so each Parser instance has its own "m_Options". So, switch the Parser won't switch the browser options, instead, it keep the browser options, but the "m_Options" need to be changed if different Parsers have different m_Options.

So, when a Parser is constructed, it first read the "m_BrowserOptions" and "m_Options" from the configure file, and later user can adjust its own options.

When we switch cbp in a workspace, one Parser get active, so its "m_Options" get active, at this time, the configure file is updated, I mean the active parser's "m_Options" is saved to the configure file.

But if you look at the function: void ClassBrowser::SetParser(ParserBase* parser), you will see:

Code
// ----------------------------------------------------------------------------
void ClassBrowser::SetParser(ParserBase* parser)
// ----------------------------------------------------------------------------
{
    if (m_Parser == parser)
        return;

    m_Parser = parser;
    if (m_Parser)
    {
        const int sel = XRCCTRL(*this, "cmbView", wxChoice)->GetSelection();
        BrowserDisplayFilter filter = static_cast<BrowserDisplayFilter>(sel);
        if (!m_ParseManager->IsParserPerWorkspace() && filter == bdfWorkspace)
            filter = bdfProject;

        m_Parser->ClassBrowserOptions().displayFilter = filter;
        m_Parser->WriteOptions();
        UpdateClassBrowserView();
    }
    else
        CCLogger::Get()->DebugLog("SetParser: No parser available.");
}

You see the "m_Parser->WriteOptions();" also get called.

So, maybe, it looks like we may need to call the "WriteClassBrowserOptions()" like function here inside the "void ClassBrowser::SetParser(ParserBase* parser)", because this class only response for the ClassBrowser related options.

10
Using Code::Blocks / Re: Hiccups while typing (continuation)
« Last post by Pecan on February 05, 2025, 06:57:53 pm »
I'm not fully understand the patch, it looks like all the Parser instance will share the same "option".

If you set a breakpoint(BP) in the file: parser.cpp, in the function body: void Parser::WriteOptions()

Then do something like below:

1, start C::B, this will hit the BP
2, when you open a project, the BP will hit again, at this time, "ReadOptions()" will be called, and returned without writing to the configure file.
3, when you change the classbrowser's option, from current "project" to "everything", the BP will hit again, and "ReadOptions()" will be called again, but still not write to the configure file.

From my point of view, this is not correct.

As Tim said, we should use "../xxxxx.h" include directive, thanks.

I can't find a "Class browser's option. Where is that?
I can possible make those options "always write" if I could figure out where that is.

As it is with the patch:
If no changes were ever made to settings, why should anything be written to the .conf?

The write to .conf takes place when a user changes an item in MainMenu>settings>CodeCompletion.

@parser.cpp void Parser::WriteOptions()
WriteOptions take place on CB startup but changes nothing because active parser is null and m_pOptsChangerProject is null.

Any change made while no project is active gets written to .conf

When a project is loaded nothing has changed in .conf, so no write options need to be done.

If changes are made to settings (OnApply is entered), the active parser that made the changes
is recorded by OnApply().
Those changes are then written to the .conf, and only the settings made by that
active project are written to the .conf. all other projects read those settings.

If no user setting are made via settings, no need to care about writing the .conf.]
Code
ActiveProject   OnAppy project  ActiveProject != OnApplyProject     action
--------------  --------------  -------------------------------    ----------
nullptr          nullptr        False,  will write                  .conf written at startup
nullptr          nullptr        False,  will write                  no projects,.option changed, .conf wrtten
Nullptr          Not null       Does not happen                     Can't happen, no project to record
Not null         nullptr        True,   no write                    no setting changed, no writes
Not null         not null       False,  will write                  option changed, .conf written
nullptr          nullptr        False,  will write                  project closed but no options change, no write
nullptr          not null       True,   no write                    project closed, .conf written for matching project

Writes to the .conf take place only when there is no project or when a project changes options.
when a project changes options, only that project is allow to write the .conf
Pages: [1] 2 3 4 5 6 ... 10