Thread: C program help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    C program help


    Hello everyone,

    I have a C program and when compiling it in TURBO C i'm getting the following errors. I'm attaching the program below along with the errors.. Kindly help out

    # include <math.h>
    # include "udf.h"
    # include "dynamesh_tools.h"
    # define DEFINE_CG_MOTION(wing,dt,vel,omega,time,dtime) {\
    double Freq, pi, w, degree, phimax, thmax, phi, dphi, dtheta;\
    degree = 20; /*degree step set by journal file*/ \
    Freq=1.0/(dtime*degree); /*dtime is the physical time step defined in the journal file*/ \
    pi = 3.141592654;\
    w=2*pi*Freq; /*Omega (radians)*/\
    phimax = 30.0*pi/180; /*flapping amplitude set by journal file*/\
    thmax = 30.0*pi/180; /*feathering amplitude set by journal file*/\
    phi = -phimax*sin(w*time); /*flapping angle*/\
    dphi = -phimax*w*cos(w*time); /*flapping speed*/\
    dtheta = thmax*w*sin(w*time); /*feathering speed*/\
    vel[0] = 0;\
    vel[1] = 0;\
    vel[2] = 0;\
    omega[0] = dphi;\
    omega[1] = dtheta*cos(phi);\
    omega[2] = dtheta*sin(phi);\
    }



    the errors are as follows
    Error C:\ TC\ Airfoil 1.c : unable to open include file ' DYNAMESH_TOOLS.H'

    Error C:\ TC\ include\udf.h : unexpected end of file in conditional started on line 0

    thanks
    sam
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,379
    Rep Power
    1871
    > I have a C program and when compiling it in TURBO C i'm getting the following errors. I'm attaching the program below along with the errors.. Kindly help out
    Yes, get a modern compiler!
    http://www.microsoft.com/express/Downloads/
    http://www.smorgasbordet.com/pellesc/
    http://www.codeblocks.org/
    http://sourceforge.net/projects/orwelldevcpp/

    > Error C:\ TC\ Airfoil 1.c : unable to open include file ' DYNAMESH_TOOLS.H'
    One of the many things that 20+ year old fossil doesn't know about is long filenames.
    This tells me that you're also using some nice machine with a modern OS.
    So there you are, driving a Ferrari being pulled by a donkey - you look awesome.

    If you really want to struggle with the past, then you're going to have to rename your file to something which matches 8.3 format, like DY_MS_TL.H or some other cryptic nonsense.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo