[so] Testul pt. tema 5
Andrei Dumitrache
so@cursuri.cs.pub.ro
Sat, 12 Feb 2005 19:11:14 +0200
O mica completare la intrebarea mea de mai inainte :
- este legata de implementarea pe Windows
- da, la build definesc acel SWAPPERLIB_EXPORTS
- cineva a spus ca la definirea in header a functiei nu ar trebui sa
folosesc directiva de export. Problema este ca daca fac asa, compilatorul se
plange ca vinit are semnaturi diferite la link-are.
Cum ziceam ... stiti remediul ?
Andrei
>From: "Andrei Dumitrache" <dvandrei2002@hotmail.com>
>Reply-To: so@cursuri.cs.pub.ro
>To: so@cursuri.cs.pub.ro
>Subject: [so] Testul pt. tema 5
>Date: Sat, 12 Feb 2005 18:19:29 +0200
>
>Daca rulez testul, da eroare la GetProcAddress. Relativ la implementarea
>bibliotecii eu zic ca e ok :
>la inceput un .h :
>#ifdef SWAPPERLIB_EXPORTS
>#define SWAPPERLIB_API __declspec(dllexport)
>#else
>#define SWAPPERLIB_API __declspec(dllimport)
>#endif
>
>... dupa care undeva la definirea functiei in .h :
>SWAPPERLIB_API void* vinit(int virt_pages, int phys_pages, int algorithm);
>
>iar in .cpp (la implementarea efectiva):
>SWAPPERLIB_API void* vinit(int virt_pages, int phys_pages, int algorithm)
>{ ... }
>
>Any ideas ?? E destul de standard
>Thanks,
>Andrei
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>_______________________________________________
>so mailing list
>so@cursuri.cs.pub.ro
>http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/