undefined reference????

J

John Carson

Codemutant said:
**** 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?
 
C

Codemutant

**** 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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top