Thread: undefined What!!

  1. #1
    Registered User breed's Avatar
    Join Date
    Oct 2001
    Posts
    91

    compiler returns "undefined symbol"

    Can you take a look at my structures plz and let me know if i'm doing somat wrong, cos i keep getting the massage "Undefined symbol" along with the variable i inspected i.e i_r_rec;

    typedef struct {
    char rec_type;
    char cust_code[6];
    char part_num[7];
    int quantity;
    }i_r_rec;

    typedef struct {
    char rec_type;
    char cust_code[6];
    }del_rec;

    typedef struct {
    char rec_type;
    char cust_code[6];
    char cust_name[20];
    char cust_addr[60];
    float cust_bal;
    int credit_limit;
    }crt_rec;

    typedef union {
    i_r_rec iss_ret;
    del_rec delete;
    crt_rec create;
    }RECORDS;

    int main() { RECORDS rec;

    is there some thing so simple that i end up glancing past,
    i've tried several ways like not using the typedef struct &
    changing the union by adding in struct i_r_rec iss_ret;
    but it still reporting as undefined


    Thank in advance peeps
    Last edited by breed; 01-22-2002 at 07:54 AM.
    Before you judge a man, walk a mile in his
    shoes. After that, who cares.. He's a mile away and you've got
    his shoes.
    ************William Connoly

  2. #2
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    using code tags will make more ppl respond...

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    undefined symbol more than often refers to a missing symbolic definition or information - it usually means that there is a header file missing.
    Monday - what a way to spend a seventh of your life

  4. #4
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    btw: what does this line do

    i_r_rec iss_ret;
    Monday - what a way to spend a seventh of your life

  5. #5
    Registered User breed's Avatar
    Join Date
    Oct 2001
    Posts
    91
    >>btw: what does this line do

    i_r_rec iss_ret;

    What does it do or what does it mean?

    i_r_rec is thar tag name for the issue/return structure
    iss_ret is the tag name used by the union to access the individual members of the issue/return struct.

    I have just been inspecting(with the debug tool) some of the keywords in my program
    struct, union, switch, & case return a window displaying expected

    but with all the header files & sscanf, well this returns "undefined symbol" now i'm starting to get a little confused
    Before you judge a man, walk a mile in his
    shoes. After that, who cares.. He's a mile away and you've got
    his shoes.
    ************William Connoly

  6. #6
    Unregistered
    Guest
    Hi breed,
    bigtamscot here, see you have taken my advice on the structures and unions. PROBLEM, you must have all members of the structures as char identifiers.....not negotiable, so each member of the three structures apart from the rec_type are strings. mail me and I will reply later on.

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    247
    Re Zenith Paints - have sent an e-mail regarding the use of above.
    hoping to be certified (programming in c)
    here's the news - I'm officially certified.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 04:42 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 11:02 AM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM