Andreas Karseras wrote:
Apologies if this is a basic question but am having trouble linking now.

Am seeing "undefined reference to..." errors but believe I have all the correct 
libraries linked.

The problematic references include axiom_node_get_first_child, 
axiom_node_get_node_type, axiom_node_get_data_element etc.

I'm linking as follows:-
g++ -LD:\MinGW\lib -LD:\axis2c\lib\ -LD:\axis2c\include -ohello.dll hello_svc.o 
-laxutil -laxiom -laxis2_parser -laxis2_engine

Any ideas ?

Can you check if libaxiom.so is there in one of the folders that you provided the linker along with -L option?

Samisa...

As before, all output as follows:-


**** Rebuild of configuration Debug for project C++ ****

**** Internal Builder is used for build               ****
gcc -DAXIS2_SKIP_INT_TYPEDEFS=1 -ID:\MinGW\include -ID:\MinGW\lib 
-ID:\axis2c\lib -ID:\axis2c\include -O0 -g3 -Wall -c -fmessage-length=0 -v 
-ansi -ohello_svc.o ..\hello_svc.c
Reading specs from D:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld 
--with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads 
--disable-nls --enable-languages=c,c++,f77,ada,objc,java 
--disable-win32-registry --disable-shared --enable-sjlj-exceptions 
--enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm 
--disable-libgcj-debug --enable-interpreter --enable-hash-synchronization 
--enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
 D:/MinGW/bin/../libexec/gcc/mingw32/3.4.5/cc1.exe -quiet -v -ID:\MinGW\include 
-ID:\MinGW\lib -ID:\axis2c\lib -ID:\axis2c\include -iprefix 
D:\MinGW\bin/../lib/gcc/mingw32/3.4.5/ -dD -DAXIS2_SKIP_INT_TYPEDEFS=1 
..\hello_svc.c -quiet -dumpbase hello_svc.c -ansi -auxbase-strip hello_svc.o 
-g3 -O0 -Wall -ansi -version -fmessage-length=0 -o 
D:\Profiles\KARSERAS\LOCALS~1\Temp/ccfxC5h5.s
ignoring nonexistent directory 
"D:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/include"
ignoring nonexistent directory 
"/mingw/lib/gcc/mingw32/3.4.5/../../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 D:/MinGW/include
 D:/MinGW/lib
 D:/axis2c/lib
 D:/axis2c/include
 D:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include
 D:/MinGW/bin/../lib/gcc/mingw32/3.4.5/include
 /mingw/lib/gcc/mingw32/3.4.5/../../../../include
 /mingw/include
 /mingw/lib/gcc/mingw32/3.4.5/include
 /mingw/include
End of search list.
GNU C version 3.4.5 (mingw-vista special r3) (mingw32)
    compiled by GNU C version 3.4.5 (mingw-vista special r3).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 D:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../mingw32/bin/as.exe 
-ohello_svc.o D:\Profiles\KARSERAS\LOCALS~1\Temp/ccfxC5h5.s
g++ -LD:\MinGW\lib -LD:\axis2c\lib\ -LD:\axis2c\include -ohello.dll hello_svc.o 
-laxutil -laxiom -laxis2_parser -laxis2_engine
hello_svc.o: In function `axis2_hello_greet':
D:/workspace/C++/Debug/../hello_svc.c:62: undefined reference to 
`axiom_node_get_first_child'
D:/workspace/C++/Debug/../hello_svc.c:63: undefined reference to 
`axiom_node_get_node_type'
D:/workspace/C++/Debug/../hello_svc.c:66: undefined reference to 
`axiom_node_get_data_element'
D:/workspace/C++/Debug/../hello_svc.c:67: undefined reference to 
`axiom_text_get_value'
D:/workspace/C++/Debug/../hello_svc.c:69: undefined reference to 
`axiom_text_get_value'
D:/workspace/C++/Debug/../hello_svc.c:77: undefined reference to 
`axutil_error_set_error_number'
D:/workspace/C++/Debug/../hello_svc.c:77: undefined reference to 
`axutil_error_set_status_code'
hello_svc.o: In function `build_greeting_response':
D:/workspace/C++/Debug/../hello_svc.c:91: undefined reference to 
`axiom_element_create'
D:/workspace/C++/Debug/../hello_svc.c:93: undefined reference to 
`axiom_element_set_text'
hello_svc.o: In function `hello_init':
D:/workspace/C++/Debug/../hello_svc.c:123: undefined reference to 
`axutil_array_list_create'
D:/workspace/C++/Debug/../hello_svc.c:124: undefined reference to 
`axutil_array_list_add'
hello_svc.o: In function `hello_on_fault':
D:/workspace/C++/Debug/../hello_svc.c:144: undefined reference to 
`axiom_element_create'
D:/workspace/C++/Debug/../hello_svc.c:146: undefined reference to 
`axiom_element_set_text'
hello_svc.o: In function `hello_free':
D:/workspace/C++/Debug/../hello_svc.c:157: undefined reference to 
`axutil_array_list_free'
D:\MinGW\lib/libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to 
[EMAIL PROTECTED]'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 832 ms.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG. Version: 8.0.100 / Virus Database: 269.23.16/1434 - Release Date: 5/15/2008 7:24 AM


--
Samisa Abeysinghe Director, Engineering; WSO2 Inc.

http://www.wso2.com/ - "The Open Source SOA Company"


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to