undefined reference????

Discussion in 'C++' started by John Carson, May 29, 2004.

  1. John Carson

    John Carson Guest

    "Codemutant" <> wrote in message
    news:
    > **** Post for FREE via your newsreader at post.usenet.com ****
    >
    > I just cannot find what is undefined in this code.
    >


    Perhaps reading the error message would help


    > C:/intellibase/linksample.cpp:15: undefined reference to
    > `parse_options_create()'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x11e):C:/intellibase/linksample.cpp:16:
    > undefined reference to `dictionary_create(char*, char*, char*, char*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x148):C:/intellibase/linksample.cpp:19:
    > undefined reference to `sentence_create(char*, Dictionary_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x15c):C:/intellibase/linksample.cpp:20:
    > undefined reference to `sentence_parse(Sentence_s*, Parse_Options_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x178):C:/intellibase/linksample.cpp:22:
    > undefined reference to `linkage_create(int, Sentence_s*,
    > Parse_Options_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x18c):C:/intellibase/linksample.cpp:23:
    > undefined reference to `linkage_print_diagram(Linkage_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1ad):C:/intellibase/linksample.cpp:24:
    > undefined reference to `string_delete(char*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1bb):C:/intellibase/linksample.cpp:25:
    > undefined reference to `linkage_delete(Linkage_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1c9):C:/intellibase/linksample.cpp:27:
    > undefined reference to `sentence_delete(Sentence_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1e1):C:/intellibase/linksample.cpp:30:
    > undefined reference to `dictionary_delete(Dictionary_s*)'
    > C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1ef):C:/intellibase/linksample.cpp:31:
    > undefined reference to
    > `parse_options_delete(Parse_Options_s*)'Execution terminated



    This lists what is undefined, so what is the problem?


    --
    John Carson
    1. To reply to email address, remove donald
    2. Don't reply to email address (post here instead)
    John Carson, May 29, 2004
    #1
    1. Advertising

  2. John Carson

    Codemutant Guest

    **** Post for FREE via your newsreader at post.usenet.com ****





    I just cannot find what is undefined in this code.



    #include "link-includes.h"

    int main() {

    Dictionary dict;
    Parse_Options opts;
    Sentence sent;
    Linkage linkage;
    char * diagram;
    int i, num_linkages;
    char * input_string[] = {
    "Grammar is useless because there is nothing to say -- Gertrude
    Stein.",
    "Computers are useless; they can only give you answers -- Pablo
    Picasso."};

    opts = parse_options_create();
    dict = dictionary_create("4.0.dict", "4.0.knowledge", NULL,
    "4.0.affix");

    for (i=0; i<2; ++i) {
    sent = sentence_create(input_string, dict);
    num_linkages = sentence_parse(sent, opts);
    if (num_linkages > 0) {
    linkage = linkage_create(0, sent, opts);
    printf("%s\n", diagram = linkage_print_diagram(linkage));
    string_delete(diagram);
    linkage_delete(linkage);
    }
    sentence_delete(sent);
    }

    dictionary_delete(dict);
    parse_options_delete(opts);
    return 0;
    }









    Compiler: Default compiler
    Executing g++.exe...
    g++.exe "C:\intellibase\linksample.cpp" -o
    "C:\intellibase\linksample.exe" -ansi -traditional-cpp -fexceptions
    -pg -g3 -I"C:\link-4.1\include" -I"C:\DEV-CPP\include\c++"
    -I"C:\DEV-CPP\include\c++\mingw32" -I"C:\DEV-CPP\include\c++\backward"
    -I"C:\DEV-CPP\include" -L"C:\DEV-CPP\lib"

    C:/intellibase/linksample.cpp:15: undefined reference to
    `parse_options_create()'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x11e):C:/intellibase/linksample.cpp:16:
    undefined reference to `dictionary_create(char*, char*, char*, char*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x148):C:/intellibase/linksample.cpp:19:
    undefined reference to `sentence_create(char*, Dictionary_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x15c):C:/intellibase/linksample.cpp:20:
    undefined reference to `sentence_parse(Sentence_s*, Parse_Options_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x178):C:/intellibase/linksample.cpp:22:
    undefined reference to `linkage_create(int, Sentence_s*,
    Parse_Options_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x18c):C:/intellibase/linksample.cpp:23:
    undefined reference to `linkage_print_diagram(Linkage_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1ad):C:/intellibase/linksample.cpp:24:
    undefined reference to `string_delete(char*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1bb):C:/intellibase/linksample.cpp:25:
    undefined reference to `linkage_delete(Linkage_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1c9):C:/intellibase/linksample.cpp:27:
    undefined reference to `sentence_delete(Sentence_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1e1):C:/intellibase/linksample.cpp:30:
    undefined reference to `dictionary_delete(Dictionary_s*)'
    C:\WINDOWS\TEMP/ccIARjgb.o(.text+0x1ef):C:/intellibase/linksample.cpp:31:
    undefined reference to `parse_options_delete(Parse_Options_s*)'Execution
    terminated


    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
    http://www.usenet.com
    Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Codemutant, May 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Felipe
    Replies:
    3
    Views:
    437
    Felipe
    Jul 16, 2004
  2. Lu
    Replies:
    1
    Views:
    559
    Roel Schroeven
    Jul 10, 2003
  3. Mantorok Redgormor
    Replies:
    70
    Views:
    1,723
    Dan Pop
    Feb 17, 2004
  4. VK
    Replies:
    45
    Views:
    574
    Dr John Stockton
    Sep 12, 2006
  5. -Lost
    Replies:
    13
    Views:
    356
    Richard Cornford
    Jan 31, 2007
Loading...

Share This Page