fehler beim erstelen einer dll

nameac

Grünschnabel
moin,

Code:
#include "stdafx.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"

short _stdcall Inp32(short PortAddress);
void _stdcall Out32(short PortAddress, short data);

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
		short i=Inp32(888);
		printf("%i",i);
    return TRUE;
}
ist code eines einfachen dll projekts compiliert ohne probleme
Code:
#include "jni.h"
#include "StrLen.h"
#include "stdio.h"
#include "string.h"
#include "stdlib.h"

JNIEXPORT    jint    JNICALL    Java_StrLen_strlen( JNIEnv *, jclass);

short _stdcall Inp32(short PortAddress);
void _stdcall Out32(short PortAddress, short data);


JNIEXPORT jint JNICALL Java_StrLen_strlen( JNIEnv *env, jclass clazz)
{
  short i=0;
	Inp32(888);
	printf( "%i",i );
  return 0;
}

das ist ein leeres dll project nach anleitung für java native interface, aber in diesem gibt es eine fehlermeldung:

Bibliothek Debug/nativ.lib und Objekt Debug/nativ.exp wird erstellt
StrLen.obj : error LNK2001: Nichtaufgeloestes externes Symbol _Inp32@4
Debug/nativ.dll : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.

die funktion _Inp32() stammt aus einer .lib die ich in beiden projekten auf gleiche weise eingebunden habe.
an der an der schnittstelle zujava liegt es nicht hab es schon getestet.
als entwicklungsumgebung benutze ich vc++ 6.0
 
Zurück