Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > using fis.c in a c++ project

Reply
Thread Tools

using fis.c in a c++ project

 
 
Martin
Guest
Posts: n/a
 
      12-16-2005
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

 
Reply With Quote
 
 
 
 
W Marsh
Guest
Posts: n/a
 
      12-16-2005
On 16 Dec 2005 09:27:18 -0800, "Martin" <(E-Mail Removed)>
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"
}
 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a
 
      12-16-2005
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???

 
Reply With Quote
 
W Marsh
Guest
Posts: n/a
 
      12-16-2005
On 16 Dec 2005 10:19:24 -0800, "Martin" <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged. windows 2003 server Claude seraphin ASP .Net 12 02-15-2014 04:29 PM
How can an asp.net project by pulling in a code-behind class from another project? moondaddy ASP .Net 4 07-27-2004 08:01 AM
Store ASP.NET project files remotely, run project locally? Raterus ASP .Net 2 04-28-2004 03:30 AM
Add C# web project to VB Web project Brad ASP .Net 2 04-01-2004 02:05 PM
Error while trying to run project: Unable to start debugging on the web server. The project is not configured Ken Stealth ASP .Net 2 01-31-2004 05:46 PM



Advertisments