i need to draw a 2D graph in C++, so i had downloaded koolplot to draw it. But the condition is- i want to use koolplot under codeblocks IDE not quincy, dev++ or else, so how should i link them??

i tried to link the libkoolplot.a but it still showing linking problems....so what are those proper libraries that should be linked??Please teach me step by step if possible .... i am really newb in programming..


i am using:
mingw compiler
windows OS
codeblocks IDE

Dani AI

Generated

A short expert follow‑up to the original post by and : using Koolplot from Code::Blocks with a MinGW toolchain on Windows commonly fails at link time for a small set of predictable reasons. The quick way to fix it is to diagnose which of those is happening, then fix the toolchain/library combination rather than the code.

First, check whether the static library you added is the same architecture/ABI as your compiler (32 vs 64 bit, and not a MSVC-built .lib). On a machine with objdump available you can inspect the archive header to confirm the architecture:

objdump -f C:\path\to\libkoolplot.a

If the archive shows i386 vs x86_64 (or the linker prints "skipping incompatible"), the toolchain and library do not match and the linker will silently refuse the file. (stackoverflow.com)

Next, make sure Code::Blocks actually sees the library and the correct search path. Project build options must include the library search directory and the library (or the full .a file) in the Linker settings; Code::Blocks documents the expected way to add libraries and search directories. If the Koolplot build you have depends on a BGI/WinBGIm backend, that backend must also be present and compiled for the same MinGW you are using. (codeblocks.org)

Koolplot’s own page lists the linker requirements and shows a sample link line (system graphics libraries plus koolplot). If you cannot find a matching prebuilt libkoolplot for your MinGW, rebuild koolplot (and WinBGIm) with the exact MinGW toolchain used by your Code::Blocks installation (the project includes a makefile/project file for that). (koolplot.codecutter.org)

If problems remain: enable verbose link output (watch the exact ld command in the build log), post the full link command and linker errors, and include the exact MinGW/GCC version and whether Code::Blocks is using a 32‑ or 64‑bit toolchain. Common fixes are switching to the matching 32/64 toolchain or rebuilding the libraries with your compiler. (stackoverflow.com)

Recommended Answers

All 2 Replies

no reply....

anyone who had tried before can answer me??? i m really new here...

What steps have you taken?
What errors do you get?

1. Did you #include "koolplot.h" ?
2. Did you link to the library file? (project->build options->linker->add files)
3. Did you install WinBGIm (which is required as is says on the koolplot site)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.