g++ is not recognizing library files

Hi All,
I am creating c++ client to access j2ee web service. I am using g++ compiler. I have used following command.

C:\cygnus\cygwin-b20\H-i586-cygwin32\bin>g++ *.cpp -ID:\axisserver\axis-c-win\ax
is-c-1-5-win32\include\ -L D:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis -
l AxisClient -ocalculator

g++: AxisClient: No such file or directory

I got the above mentioned error. But AxisClient.lib is available at D:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis.

I couldn't find what i missed . Anybody please help me....


Thanks in advance....


Hi,
Any suggestion for this issue........?


Thanks in advance

First glance says that there shouldn't be a space between -L and the directory name D:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis.

But that might just be a typing error when you posted the text?
Hi guestgulkan,

Thanks for your response. I have removed the space between -L and the directory name D:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis, but i am getting the same error.

Error:
C:\cygnus\cygwin-b20\H-i586-cygwin32\bin>gcc calculat.cpp -ID:\axisserver\axis-c-win\axis-c-1-5-win32\include\ -LD:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis calculator.o -lAxisClient -o calculatorc++

../lib/gcc-lib/i586-cygwin32/egcs-2.91.57/../../../../i586-cygwin32/bin//ld: can
not open -lAxisClient: No such file or directory

collect2: ld returned 1 exit status

Can you suggest me what i missed?

Thanks.....
I'm thinking about it:
When it comes to these sort of problems, I start thinking things like:

1. if using g++ are the library style correct. gcc uses .a libraries. Microsoft uses .lib libraries.
(I think mingw recognises both)

2. What is the full name of the AxisClient library? Is it AxisClient.a or AxisClient.lib

3. Could we be using .lib distribution made for the microsoft compilers - and gcc is choking?.
IIRC, mingw32-g++ will add the usual prefix and extension if only the library name is provided (e.g. it will interpret "bz2lib" as "libbz2lib.a"). Try using the full name.
Hi,
Thanks for your information.I am working with windows platform.

The full name of AxisClient library is AxisClient.lib. . In have used the full name also.

I have used the following command to create exe.

C:\cygnus\cygwin-b20\H-i586-cygwin32\bin>g++ -v -E *.cpp -ID:\axisserver\axis-c-win\axis-c-1-5-win32\include\ -L D:\axisserver\axis-c-win\axis-c-1-5-win32\lib\axis -l AxisClient -o calculatorc++

It has created calculatorc++.exe. But when i try to run calculatorc++, it is giving error like

C:\cygnus\CYGWIN~1\H-I586~1\bin>calculatorc++
Program too big to fit in memory

What could be the problem ? Please suggest me..
Thanks in advance....
Topic archived. No new replies allowed.