By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,201 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

undefined reference????

P: n/a
**** 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[i], 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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jul 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Codemutant" <co********@programmers.net> wrote in message
news:40******@post.usenet.com
**** 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)
Jul 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.