Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
Using Code::Blocks / Re: I gave for granted CB (Windows) was portable but...
« Last post by everSome on February 07, 2025, 07:03:06 pm »
While I do not have any experience is using Code::Blocks on non-Windows 10 platforms, configuration data can be some what confusing. I ran into a problem a year or so ago in starting up Code::Blocks. At the time I had more than one nightly full version with all its contributed plugins on my computer at the same time. Obviously with each version contained within a different Windows folder. All of  sudden the SpellChecker.dll failled to initialize on bootup because it could not find its .svg file. It turned out that in stepping through code I had inadvertently invoked the SpellChecker. Doing so had caused Code::Blocks to save what it deamed as appropriate into some files within my C:\Users\YOURNAME\AppData\Roaming\CodeBlocks folder. It turned out it was trying to find that .svg file in an old Code::Blocks folder that predated the switch over to using .svg images and had finally deleted it! I can understand maybe copying dictionary and thesaurus data into AppData, but not the location of where to find SpellChecker's .svg file during Code::Blocks initialization. Good luck.
42
Using Code::Blocks / Re: I gave for granted CB (Windows) was portable but...
« Last post by everSome on February 07, 2025, 06:07:49 pm »
On my Window 10 usage of nightly versions of Code::Blocks via MSYS2's UCRT64 environment, by default configuration data ends up in your AppData\Roaming\CodeBlocks folder. To keep that from happening, I just copy a hand constructed generic version default.conf into my output32_64 or devel32_64 folder before using it for the first time.
43
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by Evan on February 07, 2025, 03:42:16 pm »
I'm not using Window anymore, but here is my notes for w7 and it still works fine for me:

graphics.h
Global compiler settings/Toolchain executables:

Compiler's installation directory:
C:\TDM-GCC-32

Program Files:
C compiler:        : g++.exe
C++ compiler       : g++.exe
Linker dynamic libs: g++.exe
linker static libs : ar.exe
Debugger           : GDC/CDB debugger: Default
Resource compiler  : windres.exe
Make program       : mingw32-make.exe

Compiler's installation directory:
C:\TDM-GCC-32

Linker settings:
//-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
C:\TDM-GCC-32\lib\libbgi.a
C:\TDM-GCC-32\lib\libgdi32.a
C:\TDM-GCC-32\lib\libcomdlg32.a
C:\TDM-GCC-32\lib\libuuid.a
C:\TDM-GCC-32\lib\liboleaut32.a
C:\TDM-GCC-32\lib\libole32.a

Debugger:
C:\TDM-GCC-32\gdb32\bin\gdb32.exe



#include <graphics.h>

int main() {
    initwindow(640, 480, "Graphics test", 0, 300);

    int x1 = 100, y1 = 200, x2 = 500, y2 = 400;

    moveto(x1, y1);
    lineto(x1, y2);
    lineto(x2, y2);
    lineto(x2, y1);
    lineto(x1, y1);

    getchar();

    return 0;
}
44
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by nenin on February 07, 2025, 08:01:39 am »
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.
45
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by imranif on February 07, 2025, 07:54:01 am »
Is there any way to manually provide lbgi to solve the error? if not, what should i do now?
46
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by nenin on February 07, 2025, 07:51:44 am »
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)
47
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by imranif on February 07, 2025, 07:50:00 am »
Umm, i didn't understand what you meant. Could you explain a little bit? What 64 bit library should i install?
48
Help / Re: Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by stahta01 on February 07, 2025, 07:44:44 am »
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.
49
Help / Trying to install graphics.h but getting "cannot find -lbgi" error
« Last post by imranif on February 07, 2025, 07:35:25 am »
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
50
Development / Re: %I64d or %lld in the plugins\compilergcc\depslib\src\cache.c
« Last post by ollydbg on February 06, 2025, 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.  :)
Pages: 1 2 3 4 [5] 6 7 8 9 10