Header file creation problem

This is a discussion on Header file creation problem within the C Programming forums, part of the General Programming Boards category; I get an error when compiling my source file for the header, [Linker Error] Undefined reference to 'WinMain@16' Here is ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    11

    Question Header file creation problem

    I get an error when compiling my source file for the header,

    [Linker Error] Undefined reference to 'WinMain@16'

    Here is my header code:

    #define Pi 3.14159265358979323846

    extern double sin( double ); // Sine of an angle
    extern double cos( double ); // Cosine of an angle
    extern double tan( double ); // Tangent of an angle
    extern double sinh( double ); // Hyperbolic Sine of an angle
    extern double PowerOf( double, int ); // X to the power of Y
    extern double Factorial( double, int ); // Factorial of double value



    Here is the beginning of the source file:


    #include <stdio.h>
    #include <stdlib.h>
    #include <trigs.h>




    /************************************************** ****************************
    The factorial funtion will use a while loop to determine the factorial value of
    a number which will be used in the trig loop for series expansion as x/n! etc.
    ************************************************** *****************************/

    double Factorial( double value, int x)
    {
    if(x == 0) return 1;
    else
    {
    while( x > 1)
    {
    value = value / x--;
    }
    }
    return value;
    }



    etc. etc.

    Any ideas on why I'm getting a linker error?

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    11
    cool. i got it workin now. thx.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 04:25 PM
  3. Need help understanding Header Files
    By Kaidao in forum C++ Programming
    Replies: 11
    Last Post: 03-25-2008, 11:02 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 04:39 AM
  5. Problem with my file opener
    By kzar in forum C Programming
    Replies: 7
    Last Post: 04-20-2005, 05:20 PM

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