
PARGUI project files for Microsoft Visual C++ 6.0
You can either use the precompiled libraries from the ParaGUI web site, or you can build ParaGUI yourself.
Directory structure
The following directories should be created in the ParaGUI root directory:
- bin => place for binary files (.dll, .exe), paragui examples, paragui dlls
- lib => library files (.lib)
- src => ParaGUI source files
- include => directory for common headers
- expat => expat source files (ParaGUI module)
- themes => themes source files (ParaGUI module)
- test => example sources
- VisualC => MSVC++ project files & workspaces (created after unzipping from VisualC.zip)
Library files
First you have to choose if you want to link your application dynamically or statically against ParaGUI. For dynamic linkage you need the dynamic link library (DLL) and the import library (LIB). For static linkage you only need the static library (LIB). If your application should be compiled multi-threaded use the multi-threaded static library.
- paragui.dll + paragui.lib => release mode dynamic link library and import library
- paraguid.dll + paraguid.lib => debug mode dynamic link library and import library
- paraguis.lib => release mode static link library (single threaded)
- paraguisd.lib => debug mode static link library (single threaded)
- paraguimts.lib => release mode static link library (multi threaded)
- paraguimtsd.lib => debug mode static link library (multi threaded)
Note: The ParaGUI library is under LGPL licence. See licence for terms of linking with ParaGUI.
Building ParaGUI
-
Unzip the VisualC.zip file in the root ParaGUI directory.
Be certain that you unzip it into this directory and not any other directory. If you are using WinZip, be careful to make sure that it extracts into this folder, because it's convenient feature of unzipping to a folder with the name of the file currently being unzipped will get you in trouble if you use it right now.
-
Go into the VisualC directory that is created, and open the workspace file " paragui_all.dsw " with MSVC++.
You may be prompted at this point to upgrade the workspace, if you are using a more recent version of MSVC++. If so, allow the workspace to be upgraded.
-
Choose dynamic or static paragui project.
This is done by right clicking on each project in turn (Projects are listed in the Workspace panel in the FileView tab), and selecting "Set as active project".
-
ParaGUI depends on sdl.lib, sdl_ttf.lib, sdl_image.lib (when HAVE_SDLIMAGE is defined) and freetype.lib<br>
-
You need to supply these libraries to the linker. There are three ways how to do this:
Go to "Tools|Options|Directories|Library files", and add proper paths to all listed .lib files
Go to "Project|Settings|Link|Category: Input|Additional Library Path", add here path to libs (relative or absolute)
Find .lib files and copy them into /lib directory in your ParaGUI root. This dir is preset to be on the library path.
-
You also need set paths to header files of these libraries. There are also several ways how to do this:
Go to "Tools|Options|Directories|Include files", and add proper paths to all listed .lib files
Go to "Project|Settings|C/C++|Category: Preprocessor|Additional Include directories", add here paths to headers (relative or absolute)
Find .h files and copy them into /include directory in your ParaGUI root. This dir is preset to be on the include path.
-
Choose the proper configuration from "Build|Configurations...":
-
For paragui_dynamic there are
Release => produces release mode dynamic link library and import library [bin/paragui.dll, lib/paragui.lib]
Debug => produces debug mode dynamic link library and import library [bin/paraguid.dll, lib/paraguid.lib]
-
For paragui_static there are
Release = > produces release mode static link library (single threaded) [lib/paraguis.lib]
Debug => produces debug mode static link library (single threaded) [lib/paraguisd.lib]
Release MT => produces release mode static link library (multi threaded) [lib/paraguimts.lib]
Debug MT => produces debug mode static link library (multi threaded) [lib/paraguimtsd.lib]
-
Build the project with the "Project|Build" command.
You may get a few warnings, but you should not get any errors. If yes check again. If you did it all correctly, check types of libraries sdl.lib, sdl_ttf.lib, sdl_image.lib, freetype.lib. They must be compiled in mode Multithreaded DLL. Anyway check troubleshoting section.
-
Your library files are created. Check if you find them in /lib and /bin directories.
Building example files for ParaGUI
- Build paragui_dynamic project library files as described in Building ParaGUI library.
- Choose the example project you want build "As active project".
- Example projects are dependent on sdlmain.lib (lib file which comes with SDL library).
Add it to paths in similar way as is described in step 4. of Building ParaGUI library.
- Choose the configuration Debug or Release same way as step 5. of Building ParaGUI library.
- Build the project with "Project|Build" command.
File [/bin/examplename.exe] should becreated in the "bin" directory.
- Test your ParaGUI example.
It will need some dlls to run (sdl.dll, sdl_image.dll). Just copy them to bin directory or move them into system searching paths for dlls.
Troubleshooting
- I don't want to use SDL_Image library. I just want to load BMP files.
Answer: remove HAVE_SDLIMAGE define from project settings.
"Project|Settings|C/C++|Category: Preprocessor|Preprocessor definitions".
Now you don't have to supply sdl_image.lib and SDL_Image header files.
- I want to link example files statically with ParaGUI.
Answer: specify another ParaGUI library to link with in project setting:
"Project|Settings|Link|Category: General|Object/library modules", change paragui.lib to paraguis.lib (or paraguid.lib to paraguisd.lib), or use multithreaded versions of static library.
Don't forget to set proper code generation for example project:
"Project|Settings|C/C++|Category: Code generation|Use runtime library.
- I get compiler errors like: "fatal error C1083: Cannot open include file: 'SDL_image.h': No such file or directory"
Answer: header files of library were not found by the compiler. You did step 4b wrong.
- I get linker errors like: "fatal error LNK1104: cannot open file "sdl.lib""
Answer: lib file was not found by the linker. You did step 4a wrong.
- I get linker errors like: "error LNK2005: __alloc_osfhnd already defined in LIBC.lib(osfinfo.obj)"
Answer: you are mixing libraries of different types (static vs. dynamic, multithreaded vs. singlethreaded, etc.)
- I get linker warnings like: "warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library"
Answer: you are mixing libraries of different types (static vs. dynamic, multithreaded vs. singlethreaded, etc.), but it was only a warning - the project got compiled.
© 2001 Documentation written by Antonin Hildebrand
© 2001 ParaGUI library by Alexander Pipelka
The ParaGUI Project - Alexander Pipelka