using fis.c in a c++ project

Discussion in 'C++' started by Martin, Dec 16, 2005.

  1. Martin

    Martin Guest

    Hi to all,
    I'm a newbie with the c++, I have the preparation of base given from
    the Deitel & Deitel... I am trying to use the fis.c class of matlab
    fuzzy toolbox in my c++ project.
    Watching the fismain.c I have thought that it was corrected to use the
    preprocessor #includes "fis.c" but when I compile give errors on the
    fis.c. I think because it's a class written in C. How I can make in
    order to use in my c++ project the functions of the class fis? I pray
    to you you help me... I use eclipse... thanks to all
    Martin, Dec 16, 2005
    #1
    1. Advertising

  2. Martin

    W Marsh Guest

    On 16 Dec 2005 09:27:18 -0800, "Martin" <>
    wrote:

    >Hi to all,
    >I'm a newbie with the c++, I have the preparation of base given from
    >the Deitel & Deitel... I am trying to use the fis.c class of matlab
    >fuzzy toolbox in my c++ project.
    >Watching the fismain.c I have thought that it was corrected to use the
    >preprocessor #includes "fis.c" but when I compile give errors on the
    >fis.c. I think because it's a class written in C. How I can make in
    >order to use in my c++ project the functions of the class fis? I pray
    >to you you help me... I use eclipse... thanks to all


    fis.c isn't a header file - it should be compiled separately rather
    than including directly into your source code. I imagine there is an
    appropriate header file (most likely with the file extension .h)
    containing definitions for items in the fis.c, which you will include
    into your source files to reference the items in fis.c. As it's C
    code, you will probably need to include the header like this (assuming
    it's called fis.h):

    extern "C"
    {
    #include "fis.h"
    }
    W Marsh, Dec 16, 2005
    #2
    1. Advertising

  3. Martin

    Martin Guest

    I've used #include "fis.c" because it's used in a c example class,
    fismain.c

    I found in a subdirectory the file fis.h but it does'nt contain the
    function of the fis class... However I tryed to compile fis.c with cc
    of cygwin and it report this error :
    /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o)::
    undefined reference to '-WinMain@16'
    collect2: ld returned 1 exit status...

    what is mean???
    Martin, Dec 16, 2005
    #3
  4. Martin

    W Marsh Guest

    On 16 Dec 2005 10:19:24 -0800, "Martin" <>
    wrote:

    >I've used #include "fis.c" because it's used in a c example class,
    >fismain.c
    >
    >I found in a subdirectory the file fis.h but it does'nt contain the
    >function of the fis class... However I tryed to compile fis.c with cc
    >of cygwin and it report this error :
    >/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o)::
    >undefined reference to '-WinMain@16'
    >collect2: ld returned 1 exit status...
    >
    >what is mean???


    I'm afraid this is off-topic here, so all I'll say is that it seems
    like you are compiling a Windows program by mistake, so it's looking
    for WinMain as an entry point instead of main. You should really ask
    about that in a Cygwin group.

    As for fis.h - it won't contain many actual function bodies, but if
    it's the right file it will contain the declarations for the
    functions.
    W Marsh, Dec 16, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Claude seraphin
    Replies:
    12
    Views:
    2,277
    samundersingh1983
    Feb 15, 2014
  2. Ken Stealth
    Replies:
    2
    Views:
    4,309
    =?Utf-8?B?amRneChDb2xvbWJpYSk=?=
    Jan 31, 2004
  3. Brad
    Replies:
    2
    Views:
    569
    Kevin Spencer
    Apr 1, 2004
  4. Raterus
    Replies:
    2
    Views:
    834
    Joe Fallon
    Apr 28, 2004
  5. Andrea Di Giovanni

    using fis.c in a c++ project

    Andrea Di Giovanni, Dec 16, 2005, in forum: C Programming
    Replies:
    5
    Views:
    612
    Default User
    Dec 16, 2005
Loading...

Share This Page