fixed compile of retroshare-nogui on windows

must be started from cmd

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3242 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-01 21:11:25 +00:00
parent fe46d7618a
commit 4001c76ff7
2 changed files with 47 additions and 1 deletions

View File

@ -31,6 +31,48 @@
#include <iostream>
#include <sstream>
#ifdef WINDOWS_SYS
#include <conio.h>
#include <stdio.h>
#define PASS_MAX 512
char *getpass (const char *prompt)
{
static char getpassbuf [PASS_MAX + 1];
size_t i = 0;
int c;
if (prompt) {
fputs (prompt, stderr);
fflush (stderr);
}
for (;;) {
c = _getch ();
if (c == '\r') {
getpassbuf [i] = '\0';
break;
}
else if (i < PASS_MAX) {
getpassbuf[i++] = c;
}
if (i >= PASS_MAX) {
getpassbuf [i] = '\0';
break;
}
}
if (prompt) {
fputs ("\r\n", stderr);
fflush (stderr);
}
return getpassbuf;
}
#endif
void NotifyTxt::notifyErrorMsg(int list, int type, std::string msg)
{
return;

View File

@ -46,6 +46,7 @@ win32-x-g++ {
#################################### Windows #####################################
win32 {
CONFIG += console
OBJECTS_DIR = temp/obj
RCC_DIR = temp/qrc
UI_DIR = temp/ui
@ -53,8 +54,11 @@ win32 {
LIBS += ../../libretroshare/src/lib/libretroshare.a
LIBS += -L"../../../../lib" -lssl -lcrypto -lpthreadGC2d -lminiupnpc -lz
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -gdi32
LIBS += -lssl -lcrypto -lgpgme -lpthreadGC2d -lminiupnpc -lz
LIBS += -lws2_32 -luuid -lole32 -liphlpapi -lcrypt32-cygwin -lgdi32
LIBS += -lole32 -lwinmm
DEFINES *= WINDOWS_SYS
}
##################################### MacOS ######################################