By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,148 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,148 IT Pros & Developers. It's quick & easy.

using fis.c in a c++ project

P: n/a
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

Dec 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 16 Dec 2005 09:27:18 -0800, "Martin" <di***************@gmail.com>
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"
}
Dec 16 '05 #2

P: n/a
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???

Dec 16 '05 #3

P: n/a
On 16 Dec 2005 10:19:24 -0800, "Martin" <di***************@gmail.com>
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.
Dec 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.