Bonjour à tous,

Dela doc GCC : http://www.cygwin.com/cygwin-ug-net/dll.html#dll-build

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
 
#include <stdio.h>
int
hello()
{
  printf ("Hello World!\n");
}  
First compile mydll.c to object code:
gcc -c mydll.c
Then, tell gcc that it is building a shared library:
gcc -shared -o mydll.dll mydll.o
That s it! To finish up the example, you can now link to the dll with a simple program:
int 
main ()
{
  hello ();
}  
Then link to your dll with a command like:
gcc -o myprog myprog.ca -L./ -lmydll
gcc: myprog.ca: No such file or directory

D'où est-il supposé provenir ce fichier myprog avec l'extension point ca?

JPD