plot in C using DISLIN

This is a discussion on plot in C using DISLIN within the C Programming forums, part of the General Programming Boards category; Dear all, I downloaded and installed DISLIN for Win 64 bit with MS Visual C++ 8.0 compiler ( from here ...

  1. #1
    Registered User
    Join Date
    Jan 2012
    Posts
    6

    plot in C using DISLIN

    Dear all,

    I downloaded and installed DISLIN for Win 64 bit with MS Visual C++ 8.0 compiler (from here) and then restart my Code::Blocks. After that I started a new empty file and tried to follow (actually was "copy and paste") an example code. When I built my code, my Code::Blocks said


    C:\Documents and Settings\dcl\Desktop\cprogramming\plot1.c|3|fatal error C1083: Cannot open include file: 'dislin.h': No such file or directory|

    Do I need to set something in order from my Code::Blocks to recognize there is a new library??


    Thanks


    Code:
    #include <stdio.h>
    #include <math.h>
    #include "dislin.h"
    
    main()
    { int n = 100, i, ic;
      double fpi = 3.1415926/180., step, x;
      float xray[100], y1ray[100], y2ray[100];
    
      step = 360. / (n-1);
    
      for (i = 0; i < n; i++)
      { xray[i] = i * step;
        x = xray[i] * fpi;
        y1ray[i] = sin(x);
        y2ray[i] = cos(x);
      }
    
      disini();
      pagera();
      complx();
      axspos(450,1800);
      axslen(2200,1200);
    
      name("X-axis","x");
      name("Y-axis","y");
    
      labdig(-1,"x");
      ticks(9,"x");
      ticks(10,"y");
    
      titlin("Demonstration of CURVE",1);
      titlin("SIN(X), COS(X)",3);
    
      ic=intrgb(0.95,0.95,0.95);
      axsbgd(ic);
    
      graf(0.,360.,0.,90.,-1.,1.,-1.,0.5);
      setrgb(0.7,0.7,0.7);
      grid(1,1);
    
      color("fore");
      height(50);
      title();
    
      color("red");
      curve(xray,y1ray,n);
      color("green");
      curve(xray,y2ray,n);
      disfin();
    }

  2. #2
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    I don't know why nobody answered this yet.

    Yes. You have to add the new include file directory and the new library file.

    Both are under Settings / Compiler and debugger.

    Add the include file directory under the "Search directories" tab. Add the library file under the "Linker settings" tab.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bode plot in C
    By manojspam in forum C Programming
    Replies: 1
    Last Post: 10-07-2009, 10:26 AM
  2. How to plot a graph using C
    By Katie_lin in forum C Programming
    Replies: 5
    Last Post: 04-07-2009, 03:38 PM
  3. 3D Plot
    By khdani in forum Game Programming
    Replies: 1
    Last Post: 08-05-2008, 05:09 PM
  4. Plot Pixel
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 05-23-2002, 10:55 AM
  5. What Else can I do besides Plot Pixels?
    By Xterria in forum C++ Programming
    Replies: 13
    Last Post: 10-02-2001, 08:11 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21