Hi,

I'm having serious trouble getting a JNI C++-Wrapper linked under
Windows 2000.
I'm using gcc, and I thought I included and linked all the necessary
files.
But I still get undefined references from the linker:

C:\workspace\JOYSTICK>gcc -shared -lwinmm
-IC:\Programme\j2sdk1.4.2_06\include
-IC:\Programme\j2sdk1.4.2_06\include\win32 -o Joy2.dll Joystick.cpp
C:\...\Temp/ccimaaaa.o(.text+0x11):Joystick.cpp: undefined reference
to `joyGetPos@8'
C:\...\Temp/ccimaaaa.o(.text+0x81):Joystick.cpp: undefined reference
to `joyGetNumDevs@0'
C:\...\Temp/ccimaaaa.o(.text+0xa1):Joystick.cpp: undefined reference
to `joyGetPos@8'
C:\...\Temp/ccimaaaa.o(.text+0xed):Joystick.cpp: undefined reference
to `joyGetPos@8'
C:\...\Temp/ccimaaaa.o(.text+0x139):Joystick.cpp: undefined reference
to `joyGetPos@8'

file Joystick.cpp:
#include
#include
#include
#include
....

Any help or ideas would be appreciated...

Thanks,
phai