Autre question:
dans un fichier mexport.h inclus dans xmlnav.h, j'ai placé le extern pour la déclaration de getName suivant:
extern "C" EXTXMLNAV QString getName
(XMLNAV étant un typedef == à rien sous linux et == à __declspec(dllexport) sous windows)
sous Linux aucun warning n'est renvoyé par make, sous windows nmake renvoye le warning suivant:
.\mexport.h(17) : warning C4190: '' has C-linkage specified, but returns UDT 'QString' which is incompatible with C
C:\Qt3円.1.2Evaluation\include\qstring.h(383) : see declaration of 'QString'
Dans les deux cas la lib fonctionne bien la focntion getName est bien appelable, en fait comment faire pour qu'il n'y ai pas de warning??
[^] # Re: probleme pour créer une librairie/bibliothèque en c++
Posté par blackshack . En réponse au journal probleme pour créer une librairie/bibliothèque en c++. Évalué à 1.
dans un fichier mexport.h inclus dans xmlnav.h, j'ai placé le extern pour la déclaration de getName suivant:
extern "C" EXTXMLNAV QString getName
(XMLNAV étant un typedef == à rien sous linux et == à __declspec(dllexport) sous windows)
sous Linux aucun warning n'est renvoyé par make, sous windows nmake renvoye le warning suivant:
.\mexport.h(17) : warning C4190: '' has C-linkage specified, but returns UDT 'QString' which is incompatible with C
C:\Qt3円.1.2Evaluation\include\qstring.h(383) : see declaration of 'QString'
Dans les deux cas la lib fonctionne bien la focntion getName est bien appelable, en fait comment faire pour qu'il n'y ai pas de warning??