0

I want to learn IUP https://www.tecgraf.puc-rio.br/iup/

I hastily went straight trying to run HelloWorld (hello.c) program as below:

#include <stdlib.h>
#include <iup.h>

int main(int argc, char **argv)
{
  IupOpen(&argc, &argv);
  
  IupMessage("Hello World 1", "Hello world from IUP.");
  
  IupClose();
  return EXIT_SUCCESS;
}

I'm on Windows. I do have gcc installed. I downloaded the so-called IUP pre-compiled binaries (iup-3.30_Win64_mingw6_lib.zip), yet I don't know what to do with it. I assume the next step is to install/add the library into gcc but I don't know how to do that. I have no idea what I'm doing.

Naively, I ran this command on the working directory

gcc hello.c

Of course it doesn't work.

These are what appear on the terminal

hello.c:2:10: fatal error: iup.h: No such file or directory
    2 | #include <iup.h>
      |          ^~~~~~~
compilation terminated.

What I want to achieve:

  1. Successfully compile the code and run the program.
  2. Learning IUP

What I have tried:

  1. Running the gcc (despite have no idea what I'm doing)
mshahrim
  • 55
  • 11

0 Answers0