Thread: How to include header files in Mexfiles

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    8

    How to include header files in Mexfiles

    Hello
    I am trying to create a Mex file from C on Matlab code. calling a C function (with theafficheData.h header file)
    #include "afficheData.h"
    I tried to call mexfunction in MATLAB. But I get an error: undefined reference to '_afficheData' even if the afficheData function is already defined.
    Anyone know what is the problem here?
    Thanks in advance

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. where to include header files?
    By kaos_frack in forum C++ Programming
    Replies: 6
    Last Post: 12-30-2008, 03:09 PM
  2. Using #include and header files
    By _izua_ in forum C++ Programming
    Replies: 3
    Last Post: 08-12-2007, 09:08 PM
  3. Header files - where to include
    By C+/- in forum C++ Programming
    Replies: 5
    Last Post: 01-13-2007, 10:45 AM
  4. include library header in header files
    By Raison in forum C++ Programming
    Replies: 6
    Last Post: 09-27-2004, 02:50 AM
  5. Necessary to include header files?
    By Nutshell in forum C Programming
    Replies: 5
    Last Post: 01-22-2002, 04:16 AM

Tags for this Thread