Olá pessoal!
É duro ser iniciante em C++, precisar fazer DLL's e não saber resolver os problemas... mas fazer oque.. estamos aqui para aprender, rsrsrss... Bom.. Estou tentando compilar esse código C++ (para acessar do Java com JNI):#include "ExecutaDll.h"
#include <Windows.h>
#include <winuser.h>
JNIEXPORT jboolean JNICALL Java_br_com_unimake_nativo_ExecutaDll_setDateTime
(JNIEnv * env, jclass obj, jint year, jint month, jint day, jint hour, jint minute, jint second) {
SYSTEMTIME time;
time.wYear = year;
time.wMonth = month;
time.wDay = day;
time.wDayOfWeek = 1;
time.wHour = hour + 3;
time.wMinute= minute;
time.wSecond = second;
return SetSystemTime(&time) != 0;
}
JNIEXPORT void JNICALL Java_br_com_unimake_nativo_ExecutaDll_telaInteira
(JNIEnv * env, jclass obj) {
HWND hTaskBar = FindWindow(_T("HHTaskBar"), NULL);
if (hTaskBar != NULL){
ShowWindow(hTaskBar, SW_HIDE);
}
}
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class ExecutaDll */
#ifndef _Included_ExecutaDll
#define _Included_ExecutaDll
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: ExecutaDll
* Method: setDateTime
* Signature: (IIIIII)Z
*/
JNIEXPORT jboolean JNICALL Java_br_com_unimake_nativo_ExecutaDll_setDateTime
(JNIEnv *, jclass, jint, jint, jint, jint, jint, jint);
/*
* Class: ExecutaDll
* Method: telaInteira
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_br_com_unimake_nativo_ExecutaDll_telaInteira
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif
ExecutaDll.obj : error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _Java_br_com_unimake_nativo_ExecutaDll_telaInteira@8
ExecutaDll.obj : error LNK2019: unresolved external symbol __imp__FindWindowW@8 referenced in function _Java_br_com_unimake_nativo_ExecutaDll_telaInteira@8
ExecutaDll.obj : error LNK2019: unresolved external symbol __T referenced in function _Java_br_com_unimake_nativo_ExecutaDll_telaInteira@8
w32.dll : fatal error LNK1120: 3 unresolved externals
Alguém já teve um problema parecido?
Obrigada
