[so] [TEMA 2] [WIN] Problema compilare

Diana Vasile diavasile at yahoo.com
Sun Apr 8 00:37:48 EEST 2012


2012/4/7 Diana Vasile <diavasile-/E1597aS9LQAvxtiuMwx3w at public.gmane.org>
Salut!

Nu imi iese compilarea in Windows cu dll-ul ala. In codul serverului, am inclus crypto.h si 
i-am dat __declspec(dllimport) DWORD decrypt_base64(void *in, DWORD len, void *out);
etc, dar la compilare imi zice:
c:\cygwin\home\student\crypto.h(10) : error C2061: syntax error : identifier 'crypt_base64' c:\cygwin\home\student\crypto.h(10) : error C2059: syntax error : ';' c:\cygwin\home\student\crypto.h(10) : error C2059: syntax error : 'type' c:\cygwin\home\student\crypto.h(11) : error C2061: syntax error : identifier 'decrypt_base64' c:\cygwin\home\student\crypto.h(11) : error C2059: syntax error : ';' c:\cygwin\home\student\crypto.h(11) : error C2059: syntax error : 'type'

si tot asa pt toate functiile din crypto.h.

In Makefile am asa ceva: 

server.exe: server.obj $(WIN_IPC_OBJ) crypto.lib
link $(LDFLAGS) /OUT:$ <at> $** 
Ce am omis?
Trebuie sa incluzi windows.h inainte sa incluzi crypto.h ca sa stie de DWORD.Si eu uitasem si nu pricepeam.
Nu am modificat nimic la crypto.h, iar flagurile de compilare sunt cele din laboratorul 5:
CFLAGS = /nologo /I. /W3 /D_CRT_SECURE_NO_DEPRECATE /DWIN32 /EHsc 
LDFLAGS = /nologo

-- 
Alexandru - George Burghelea

Intr-adevar, am schimbat ordinea include-urilor si acuma merge :)Multumesc 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120407/36e20163/attachment.html>


More information about the so mailing list