0

I don't know how to get around this issue, every time I run my code it stops compiling and jumps to the CImg.h header file. In function int cimg_library::cimg::fseek(), fseeki64 is undeclared. A similar error appears for the ftelli64 function. I did not have this issue while using dev-c++. Does anyone know what causes this?

Thanks in advance!

bluefog21
  • 11
  • 4
  • wouldn't including the CImg header file be enough? – bluefog21 Jul 25 '16 at 18:19
  • Yeah, ignore my previous comment, since it seems to occur in their header. And speaking of which: Are you sure you're compiling for the right architecture, with the right settings for it? The fact that both missing functions end in `64` seems indicative. Are you targeting 64-bit, with 64-bit compiler settings, `#include`ing the 64-bit version of the header, using a 64-bit standard library, etc.? – underscore_d Jul 25 '16 at 18:19
  • Sorry I don't know what you mean by right settings :/ – bluefog21 Jul 25 '16 at 18:28
  • 1
    Then I suggest reading the documentation of your chosen compiler and IDE more thoroughly. But until then, let me rephrase: Are you trying to compile for a 32-bit or 64-bit CPU/OS? Which compiler are you using? Is it capable of compiling for that architecture? Have you told it to? Are you using header files (Standard Library and CImg) that are for the matching architecture? Dev-C++ might have worked before out of luck, but at some point, you'll have to think about how this all fits together, and it looks like that's now. – underscore_d Jul 25 '16 at 18:33
  • The compiler is gnu gcc and the os is 64 bit. I will try compiling with ming w64? – bluefog21 Jul 25 '16 at 18:37
  • MinGW _is_ GCC: see here: https://gcc.gnu.org/install/binaries.html And again, the compiler and OS are only part of the picture: whether you're setting them up correctly to talk to each other and the relevant libraries (where the `f*i64()` functions live) is the other, and it's a far larger part. – underscore_d Jul 25 '16 at 18:49
  • Yeah I just checked the details on the gnu gcc compiler and it is indeed 32 bit. I downloaded the 64 bit version on mingw and it should work. Thanks for your help! – bluefog21 Jul 25 '16 at 18:51
  • You're welcome; let me know once you've checked and whether that fixes it. Btw, once you start feeling an urge to use the command-line more ;-) check out [MSYS2](https://sourceforge.net/projects/msys2/), a complete GNU toolchain, with MinGW32/64 for compiling native Windows binaries, and a port of Arch Linux's packaging system `pacman` drawing on tonnes of good libraries to develop with. I develop on Debian Linux, but MSYS2 makes building the same code on Windows a breeze. – underscore_d Jul 25 '16 at 18:56
  • This should help... http://stackoverflow.com/a/38447025/2836621 – Mark Setchell Aug 29 '16 at 09:35

0 Answers0