Using
wxWindows with BCC5.5 |
Utiliser
wxWindows avec BCC5.5 |
1. What is wxWindows? | Qu'est-ce que wxWindows? |
wxWindows is a open source GUI
framework allowing you to build cross-platform applications. wxWindows
is also used as the graphical framework in C++BuilderX. For details and
downloading the last stable release, see the wxWindows web site. At the time I
wrote this article, the latest stable version was 2.4.2. |
wxWindows est un framework graphique open source et multi-plateformes. C'est aussi le framework utilisé par C++BuilderX. Pour les détails et le téléchargement de la dernière version stable, je vous renvoie au site de wxWindows. Au moment où je rédige cet article, la dernière version stable est la 2.4.2. |
2. Installing
wxWindows. |
Installer wxWindows. |
- Go to the wxWindows web site to download
the latest stable version. - Unzip the file in a folder of your choice. Beware, the path where you unzip the files can't have any space or '-' in it. That's important. - Set an environment variable called WXWIN to the path where
you installed the wxWindows files. Do this either in your autoexec.bat
file or using Control Panel/System/Advanced tab. |
-
Rendez-vous sur le site de
wxWindows pour télécharger la dernière version
stable. - Dézipper le fichier dans le répertoire de votre choix mais faites attention que le chemin du répertoire ne peut pas contenir d'espace ou de '-'. Important! - Créer une variable d'environnement appelée WXWIN
dans laquelle vous spécifiez le chemin du répertoire
où vous avez placé les fichiers. Vous ajoutez cette
variable soit dans votre autoexec.bat soit via le Panneau de
configuration/Système/Avancés. |
3. Compiling the library. | Compilation de la librairie. |
Now that you have the source code,
you have to compile the library in order to get a lib file usable with
the free commandline tool. It's not that hard at all. How to do this is
explained in the file $(WXWIN)\docs\msw\install.txt, with &(WXWIN)
being the path where you installes wxWindows. The lib file you have to add to every project that uses wxWindows is called wx24ds_bcc.lib. To create the lib file, go to $(WXWIN)\src\msw and type from the command line: |
Maintenant
que les fichiers source sont installés, vous devez compiler la
librairie pour obtenir un fichier .lib utilisable avec BCC5.5. La
procédure est expliquée dans le fichier
$(WXWIN)\docs\msw\install.txt. $(WXWIN) est le chemin du
répertoire racine où lwxWindows est installé. Ce
fichier .lib appelé wx24ds_bcc.lib est à inclure dans
chacun de vos projets qui utilisent wxWindows. Pour créer le .lib, allez dans le répertoire $(WXWIN)\src\msw et tapez depuis une ligne de commande: |
make -f makefile.b32 |
4. Using wxWindows | Utiliser wxWindows |
Change the files Bcc32.cfg and
Ilink32.cfg which are in the $(BCB)\bin directory to include the path
to the wxWindows header files and lib files. here is what mines look like: |
Modifiez
les fichiers Bcc32.cfg et Ilink32.cfg qui se trovent dans le
répertoire bin de BCC5.5 de façon à y inclure le
chemin vers les fichiers entêtes et lib de wxWindows. Les miens ressemblent à ceci: |
Bcc32.cfg |
You are now able to compile wxWindows applications. Below, I give you an example of makefile usable with BCC5.5 to compile your projects. You can customize it to suit your needs. Basically, you just have to change, in the body of the makefile, the name of your source files and the name of your resulting application. The are comments in the code to show you where to make those changes. | Vous êtes maintenant capable de compiler vos applications pour wxWindows. Ci-dessous, je vous donne un exemple de makefile utilisable avec BCC5.5 et qui permet de compiler une application wxWindows. Vous devez juste changer dans le corps du fichier makefile le nom de votre application et le nom des fichiers source. Il y a des commentaires dans le code qui vous indiquent où effectuer ces changements. |
# WXWIN = Environment variable set when compiling the wxWindows libraries. |
Note that the samples provided with
wxWindows already have their own makefiles. Each sample has a file
called makefile.b32. You can use those files to compile the samples.
The makefile above is only needed when you compile your own
applications. Don't forget to look at the wxWindows web site for documentation, tutorials and samples. |
Les
examples fournis avec wxWindows possèdent déjà
leur propre makefile. Le makefile donné plus haut n'est
nécessaire que lorsque vous compilez vos propres applications. N'oubliez pas non plus de visiter le site de wxWindows. Vous y trouverez la documentation, des tutoriels et des examples. |