This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

.a file can not link to .lib file???


Hi,
I want to create a .dll file(libwingdi_plugin.dll) for jni(Java native
interface).JNI needs to link jawt.lib,so i add "-L. -ljawt" to makefile.But
it still can't find the function(`__imp__JAWT_GetAWT@8) which is in
jawt.lib.I guess the cause is .a file can not link to .lib,but i don't know
how to solve this problem.

The makefile process to create libwingdi_plugin.dll is to let wingdi.c
change to libwingdi_plugin_a-wingdi.o.Then libwingdi_plugin_a-wingdi.o
change to libwingdi_plugin.a.When libwingdi_plugin.a change to
libwingdi_plugin.dll,then error occurs.Here's the error messages.

if g++ -mno-cygwin   -DHAVE_CONFIG_H -I. -I. -I../..   -I/usr/win32/include
-I/u
sr/win32/include/ebml -D_OFF_T_ -D_off_t=long -DSYS_MINGW32 -I../../include
`top
_builddir="../.." ../../vlc-config --cflags plugin wingdi` -Wsign-compare
-Wall
 -mms-bitfields -pipe -L. -ljawt  -MT libwingdi_plugin_a-wingdi.o -MD -MP
-MF ".
deps/libwingdi_plugin_a-wingdi.Tpo" \
          -c -o libwingdi_plugin_a-wingdi.o `test -f 'wingdi.c' || echo
'./'`win
gdi.c; \
        then mv -f ".deps/libwingdi_plugin_a-wingdi.Tpo"
".deps/libwingdi_plugin
_a-wingdi.Po"; \
        else rm -f ".deps/libwingdi_plugin_a-wingdi.Tpo"; exit 1; \
        fi
rm -f libwingdi_plugin.a
ar cru libwingdi_plugin.a libwingdi_plugin_a-wingdi.o
ranlib libwingdi_plugin.a
/bin/sh ../../libtool --mode=link g++ -mno-cygwin -Wsign-compare -Wall
-mms-bitf
ields -pipe -L. -ljawt -L/usr/win32/lib -o libwingdi_plugin.dll
libwingdi_plugin
.a -L/usr/local/lib -g -shared -lgdi32 -u _vlc_entry__0_8_6
g++ -mno-cygwin -Wsign-compare -Wall -mms-bitfields -pipe -o
libwingdi_plugin.dl
l.exe -g -shared -u _vlc_entry__0_8_6  -L/home/Yao/vlc/modules/video_output
-lja
wt -L/usr/win32/lib libwingdi_plugin.a -L/usr/local/lib -lgdi32
libwingdi_plugin.a(libwingdi_plugin_a-wingdi.o): In function
`Java_LinkVLC_paint
':
/home/Yao/vlc/modules/video_output/wingdi.c:1381: undefined reference to
`__imp_
_JAWT_GetAWT@8'
collect2: ld returned 1 exit status
make[4]: *** [libwingdi_plugin.dll] Error 1

-- 
View this message in context: http://www.nabble.com/.a-file-can-not-link-to-.lib-file----tf3228579.html#a8969593
Sent from the gcc - Help mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]