missing type definition

This is a discussion on missing type definition within the C Programming forums, part of the General Programming Boards category; Dear all, I generated C code from function block diagram, in which I see the following lines extern int32 *BF_ANA; ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    1

    missing type definition

    Dear all,
    I generated C code from function block diagram, in which I see the following lines

    extern int32 *BF_ANA;
    extern uchar *BF_BOO;

    #define _SCC_FZPF_ID0200314_OUT2_VA 0X0413
    #define _SCC_MYAVFBD_OUT2 0X0411
    #define _SCC_MYAVFBD_OUT1 0X05FB
    #define _SCC_FZPF_ID0200314_OUT1_VA 0X05FF


    BF_BOO[ _SCC_MYAVFBD_OUT2 ] = BF_BOO[ _SCC_FZPF_ID0200314_OUT2_VA ];
    BF_ANA[ _SCC_MYAVFBD_OUT1 ] = BF_ANA[ _SCC_FZPF_ID0200314_OUT1_VA ];

    I suppose BF_ANA and BF_BOO have been defined in some other header files which is not given out after code generation. Can someone help me how to define these items?
    Thanks
    Roshni

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    What do you expect us to do with snippets of meaningless symbols generated by some auto code generation tool?

    Well you could do
    int32 *BF_ANA = malloc( pickHoweverManyYouNeed * sizeof(*BF_ANA) );

    Or perhaps your model is wrong, if it's emitting declarations for things, without the definitions.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    2,053
    BF_ANA and BF_BOO would be defined in source files, not headers.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. confused with new type of int definition
    By devilofwar in forum C Programming
    Replies: 2
    Last Post: 12-07-2010, 02:39 PM
  2. Type definition issues?
    By FlyingIsFun1217 in forum C++ Programming
    Replies: 1
    Last Post: 07-05-2010, 07:17 PM
  3. missing type specifier - int assumed??
    By AJOHNZ in forum C++ Programming
    Replies: 6
    Last Post: 09-06-2009, 01:49 AM
  4. Error: Missing type specifier
    By Litz in forum C++ Programming
    Replies: 6
    Last Post: 03-17-2009, 05:32 PM
  5. enumerated type and lvalue missing
    By baniakjr in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 06:06 AM

Tags for this Thread


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