Looks like you have not linked the libs correctly.
You have to use
-L{path to libs} -laxis2_util -laxis2_axiom -laxis2_wsdl -laxis2_engine
-laxis2_parser -lpthread -lwoden -laxis2_xml_schema -laxis2_http_sender
-laxis2_http_receiver -lxml2 -lpthread -lz -lm -ldl
when linking. You have to replace {path to libs} with the path where you
have libs.
Samisa...
João Carlos Bortoletto wrote:
Hi friends,
I'm new in C/C++ programming language. I was trying to compile the
simple example "echo.c" using gcc under mingw (win32).
Compilation was successful (gcc -c), but when I try to link
(generate .exe) I receive the following messages:
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x72):echo.c:
undefined reference to `_imp__axis2_env_create_all'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0xa2):echo.c:
undefined reference to `_imp__axis2_strcmp'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0xfa):echo.c:
undefined reference to `_imp__axis2_endpoint_ref_create'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x10a):echo.c:
undefined reference to `_imp__axis2_options_create'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x17a):echo.c:
undefined reference to `_imp__axis2_svc_client_create'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x39d):echo.c:
undefined reference to `_imp__axiom_namespace_create'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x3cb):echo.c:
undefined reference to `_imp__axiom_element_create'
C:\DOCUME~1\JBORTO~1\CONFIG~1\Temp/ccW2baaa.o(.text+0x3f9):echo.c:
undefined reference to `_imp__axiom_element_create'
collect2: ld returned 1 exit status
The command line is:
set LIB_DIR=D:\work\myproject\lib
gcc -o echo -B D:\work\myproject echo.c %LIB_DIR%/axiom.lib
%LIB_DIR%/axis2_engine.lib %LIB_DIR%/axis2_http_receiver.lib
%LIB_DIR%/axis2_http_sender.lib %LIB_DIR%/axis2_parser.lib
%LIB_DIR%/axis2_util.lib %LIB_DIR%/axis2_wsdl.lib %LIB_DIR%/iconv.lib
%LIB_DIR%/iconv_a.lib %LIB_DIR%/libxml2.lib %LIB_DIR%/libxml2_a.lib
%LIB_DIR%/mod_axis2.lib %LIB_DIR%/woden.lib %LIB_DIR%/xml_schema.lib
%LIB_DIR%/zdll.lib %LIB_DIR%/zlib.lib
Thanks for any help!
Joao Bortoletto
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]