MATLAB error

This is a discussion on MATLAB error within the Tech Board forums, part of the Community Boards category; I got this crazy error out of my matlab code and i know you guys dont know matlab nessasarily but ...

  1. #1
    Wanabe Laser Engineer chico1st's Avatar
    Join Date
    Jul 2007
    Posts
    168

    MATLAB error

    I got this crazy error out of my matlab code and i know you guys dont know matlab nessasarily but i have bolded the interesting part. I was just wondering if you had any insight.

    what i did was link to DTEST.dll
    I inlcuded the header DLLTEST.h seen here:
    Code:
    #include "niimaq.h"
    #include "stdint.h"
    // Error display function
    extern "C" __declspec(dllexport) void DisplayIMAQError(int32_t error);
    //
    // Callbacks
    extern "C" __declspec(dllexport) int AnalogueCardInit(uint32_t *Sid, uint32_t *Iid, uint8_t *image1D, uint8_t **image2D);
    extern "C" __declspec(dllexport) int AnalogueCardClose(uint32_t *Sid, uint32_t *Iid);
    extern "C" __declspec(dllexport) int AnalogueCardSnap(uint32_t Sid, uint8_t *ImaqBuffer, uint32_t top, uint32_t left, uint32_t height, uint32_t width);
    i also inlcuded (just like #inlcude) stdint.h and another header which has the prototypes for another library DTEST.dll links to:

    Code:
    USER_FUNC imgInterfaceOpen(const int8_t* interface_name, uint32_t* ifid);
    USER_FUNC imgSessionOpen(uint32_t ifid, uint32_t* sid);
    USER_FUNC imgClose(uint32_t void_id, uint32_t freeResources);
    USER_FUNC imgSnap(uint32_t sid, void **bufAddr);
    USER_FUNC imgSnapArea(uint32_t sid, void **bufAddr,uint32_t top,uint32_t left, uint32_t height, uint32_t width,uint32_t rowBytes);
    USER_FUNC imgGrabSetup(uint32_t sid, uint32_t startNow);
    USER_FUNC imgGrab(uint32_t sid, void** bufPtr, uint32_t syncOnVB);
    USER_FUNC imgGrabArea(uint32_t sid, void** bufPtr, uint32_t syncOnVB, uint32_t top, uint32_t left, uint32_t height, uint32_t width, uint32_t rowBytes);
    USER_FUNC imgRingSetup(uint32_t sid,  uint32_t numberBuffer,void* bufferList[], uint32_t skipCount, uint32_t startnow);
    USER_FUNC imgSequenceSetup(uint32_t sid,  uint32_t numberBuffer,void* bufferList[], uint32_t skipCount[], uint32_t startnow, uint32_t async);
    USER_FUNC imgSessionStartAcquisition(uint32_t sid);
    USER_FUNC imgSessionStopAcquisition(uint32_t sid);
    USER_FUNC imgSessionStatus(uint32_t sid, uint32_t* boardStatus, uint32_t* bufIndex);
    USER_FUNC imgSessionConfigureROI(uint32_t sid, uint32_t top, uint32_t left, uint32_t height, uint32_t width);
    USER_FUNC imgSessionGetROI(uint32_t sid, uint32_t* top, uint32_t* left, uint32_t* height, uint32_t* width);
    USER_FUNC imgSessionGetBufferSize(uint32_t sid, uint32_t* sizeNeeded);
    USER_FUNC imgGetAttribute(uint32_t void_id, uint32_t type, void* value);
    USER_FUNC imgCreateBuffer(uint32_t sid, uint32_t where, uint32_t bufferSize, void** bufAddr);
    USER_FUNC imgDisposeBuffer(void* bufferPtr);
    USER_FUNC imgShowError(uint32_t error, int8_t* text);

    Code:
    loadlibrary DTEST.dll DLLTEST.h addheader stdint.h addheader niimaq.h
    Warning: Message from C preprocessor:
    lcc preprocessor warning: C:\Program Files\MATLAB\R2006a\work\MATLAB\stdint.h:33 C:\Program Files\MATLAB\R2006a\work\MATLAB\DLLTEST.h:2 #error directive: "Use this header only with Microsoft Visual C++ compilers!"
    
    > In loadlibrary at 218
    ??? Error using ==> loadlibrary
    Call to Perl failed.  Possible error processing header file.
    Output of Perl command:
    Error using ==> perl
    System error: Working string is 'typedef __int8 int8_t ;'.
    ERROR: Attempt to redefine 'error' current definition int8 new definition error.
    
    Found on line 2030 of input from line 59 of file C:\Program Files\MATLAB\R2006a\work\MATLAB\stdint.h
    
    Command executed: perl "C:\Program Files\MATLAB\R2006a\toolbox\matlab\general\private\prototypes.pl" DLLTEST.i -outfile=DTEST_proto.m stdint.h niimaq.h
    
    Error in ==> loadlibrary at 273
        diagnoseError(err);

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >'typedef __int8 int8_t ;'.
    Is the above what line 59 looks like in stdint.h?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 09:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

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