Bonjour , je crée en ce moment une DLL regroupant un nombre important de fonctions mathématiques pouvant servir du CP à la seconde, pour l'instant lorsque je compile, hé bien ca compile mais il me met mon compilo me met quand même ce message :
Le "warning" est présent pour toutes les fonctions de ma dll (c.f : fichier.c)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 samsoft_maths.c:108: warning: function 'ss_volume_cone_revolution' is defined after prior declaration as dllimport: attribute ignored samsoft_maths.c:110:2: warning: no newline at end of file Linking dynamic library: samsoft_maths.dll Creating library file: libsamsoft_maths.a Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 17 warnings
fichier .h
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76 /* Fichier : samsoft_maths.h Auteur : Samy Hocine (SamSoft) http://www.samsoft.ift.fr ; samyhocine@hotmail.fr Date : Mercredi 4 fervrier Description : None Licence : GNU/GPL Information : ss ou SS veut dire SamSoft */ #ifndef H_TC_SAMSOFT_MATHSDLL_20070214181222 #define H_TC_SAMSOFT_MATHSDLL_20070214181222 #ifdef SAMSOFT_MATHSDLL_BUILD #define SAMSOFT_MATHSDLL_API __declspec(dllexport) #else #define SAMSOFT_MATHSDLL_API __declspec(dllimport) #endif extern const double PI; double SAMSOFT_MATHSDLL_API ss_carre(double a); double SAMSOFT_MATHSDLL_API ss_cube(double a); double SAMSOFT_MATHSDLL_API ss_perimetre_cercle(double r); double SAMSOFT_MATHSDLL_API ss_aire_cercle(double r); double SAMSOFT_MATHSDLL_API ss_aire_triangle(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_triangle_equi(double a); double SAMSOFT_MATHSDLL_API ss_aire_triangle_rect(double b, double c); double SAMSOFT_MATHSDLL_API ss_aire_rectangle(double l, double m); double SAMSOFT_MATHSDLL_API ss_aire_carre(double a); double SAMSOFT_MATHSDLL_API ss_aire_parallelogramme(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_losange(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_trapeze(double a, double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_sphere(double r); double SAMSOFT_MATHSDLL_API ss_volume_pyramide(double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_tetraedre(double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_cone_revolution(double r, double h); #endif /* Fichier : samsoft_maths.h Auteur : Samy Hocine (SamSoft) http://www.samsoft.ift.fr ; samyhocine@hotmail.fr Date : Mercredi 4 fervrier Description : None Licence : GNU/GPL Information : ss ou SS veut dire SamSoft */ #ifndef H_TC_SAMSOFT_MATHSDLL_20070214181222 #define H_TC_SAMSOFT_MATHSDLL_20070214181222 #ifdef SAMSOFT_MATHSDLL_BUILD #define SAMSOFT_MATHSDLL_API __declspec(dllexport) #else #define SAMSOFT_MATHSDLL_API __declspec(dllimport) #endif extern const double PI; double SAMSOFT_MATHSDLL_API ss_carre(double a); double SAMSOFT_MATHSDLL_API ss_cube(double a); double SAMSOFT_MATHSDLL_API ss_perimetre_cercle(double r); double SAMSOFT_MATHSDLL_API ss_aire_cercle(double r); double SAMSOFT_MATHSDLL_API ss_aire_triangle(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_triangle_equi(double a); double SAMSOFT_MATHSDLL_API ss_aire_triangle_rect(double b, double c); double SAMSOFT_MATHSDLL_API ss_aire_rectangle(double l, double m); double SAMSOFT_MATHSDLL_API ss_aire_carre(double a); double SAMSOFT_MATHSDLL_API ss_aire_parallelogramme(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_losange(double b, double h); double SAMSOFT_MATHSDLL_API ss_aire_trapeze(double a, double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_sphere(double r); double SAMSOFT_MATHSDLL_API ss_volume_pyramide(double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_tetraedre(double b, double h); double SAMSOFT_MATHSDLL_API ss_volume_cone_revolution(double r, double h); #endifQuelle est la solution à mon problème ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110 /* Fichier : samsoft_maths.c Auteur : Samy Hocine (SamSoft) http://www.samsoft.ift.fr ; samyhocine@hotmail.fr Date : Mercredi 4 fervrier Description : Dll incluant divers fonctions mathématiques Licence : GNU/GPL Information : ss ou SS veut dire SamSoft */ #include "samsoft_maths.h" const double PI = 3.1415926535897932384626433832795; double SAMSOFT_MATHSDLL_API ss_carre(double a) { return a*a; } double SAMSOFT_MATHSDLL_API ss_cube(double a) { return a*a*a; } double SAMSOFT_MATHSDLL_API ss_perimetre_cercle(double r) { return 2*PI*r; } double SAMSOFT_MATHSDLL_API ss_aire_cercle(double r) //r = rayon// { return PI*r*r; } double SAMSOFT_MATHSDLL_API ss_aire_triangle(double b, double h) //triangle quelconque, b = base et h = hauteur// { return (b*h)/2; } double SAMSOFT_MATHSDLL_API ss_aire_triangle_equi(double a) //triangle équilateral, a est la longeur d'un côté// { int increment; double resultat; double an; double an1; if (a >= 0) { an=a; for (increment=0;increment<8;increment++) an1=(an+(a)/an)/2; an==an1; resultat==an1; return resultat; } else if (a < 0) { return -0.00000; } } double SAMSOFT_MATHSDLL_API ss_aire_triangle_rect(double b, double c) //triangle rectangle, b et c sont les longeurs de deux côtés autres que l'hypothénuse// { return (b*c)/2; } double SAMSOFT_MATHSDLL_API ss_aire_rectangle(double l, double m)//l = longeur ; m = largeur/ { return l*m; } double SAMSOFT_MATHSDLL_API ss_aire_carre(double a)//a étant la longeur d'un côté// { return a*a; } double SAMSOFT_MATHSDLL_API ss_aire_parallelogramme(double b, double h)//b étant la base et h la hauteur// { return b*h; } double SAMSOFT_MATHSDLL_API ss_aire_losange(double b, double h)//b étant la base et h la hauteur// { return (b*h)/2; } double SAMSOFT_MATHSDLL_API ss_aire_trapeze(double a, double b, double h)//b étant la base et h la hauteur et a la longeur du côté du dessus// { return 1/2*(a+b)*h; } double SAMSOFT_MATHSDLL_API ss_volume_sphere(double r)//r étant le rayon de la sphère// { return 4*PI*r*r; } double SAMSOFT_MATHSDLL_API ss_volume_pyramide(double b, double h)//b est la base d'aire et h la hauteur// { return 1/3*b*h; } double SAMSOFT_MATHSDLL_API ss_volume_tetraedre(double b, double h)//b est la base d'aire et h la hauteur// { return 1/3*b*h; } double SAMSOFT_MATHSDLL_API ss_volume_cone_revolution(double r, double h)//r est le rayon de la base qui est un cercle et h la hauteur// { return 1/3*PI*r*r*h; }
Merci,
Partager