1 | README.MSWindows.txt - 2010-10-25 - Building FLTK under Microsoft Windows |
---|
2 | ------------------------------------------------------------------------- |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | CONTENTS |
---|
7 | ========== |
---|
8 | |
---|
9 | 1 INTRODUCTION |
---|
10 | 2 HOW TO BUILD FLTK USING MinGW/Cygwin |
---|
11 | 2.1 The Tools |
---|
12 | 2.2 Recommended Command Line Build Environment |
---|
13 | 2.3 Prerequisites |
---|
14 | 2.4 Downloading and Unpacking |
---|
15 | 2.5 Configuring FLTK |
---|
16 | 2.6 Building FLTK |
---|
17 | 2.7 Testing FLTK |
---|
18 | 2.8 Installing FLTK |
---|
19 | 2.9 Creating new Projects |
---|
20 | 3 HOW TO BUILD FLTK USING VISUAL STUDIO 2008 |
---|
21 | 3.1 Prerequisites |
---|
22 | 3.2 Downloading and Unpacking |
---|
23 | 3.3 Configuring FLTK |
---|
24 | 3.4 Building FLTK |
---|
25 | 3.5 Testing FLTK |
---|
26 | 3.6 Installing FLTK |
---|
27 | 3.7 Creating new Projects |
---|
28 | 4 HOW TO BUILD FLTK USING VISUAL STUDIO 2010 |
---|
29 | 4.1 Prerequisites |
---|
30 | 4.2 Downloading and Unpacking |
---|
31 | 4.3 Configuring FLTK |
---|
32 | 4.4 Building FLTK |
---|
33 | 4.5 Testing FLTK |
---|
34 | 4.6 Installing FLTK |
---|
35 | 4.7 Creating new Projects |
---|
36 | 5 FREQUENTLY ASKED QUESTIONS |
---|
37 | 7 LINKS |
---|
38 | 6 DOCUMENT HISTORY |
---|
39 | |
---|
40 | |
---|
41 | INTRODUCTION |
---|
42 | ============== |
---|
43 | |
---|
44 | FLTK 1.3 and later is officially supported on Windows (2000,) 2003, |
---|
45 | XP, and later. Older Windows versions are not officially supported, |
---|
46 | but may still work. The main reason is that the OS version needs |
---|
47 | to support UTF-8. FLTK 1.3 is known to work on Windows 7 and Vista. |
---|
48 | |
---|
49 | FLTK currently supports the following development |
---|
50 | environments on the Windows platform: |
---|
51 | |
---|
52 | - Free Microsoft Visual C++ 2008 Express and Visual |
---|
53 | C++ 2010 Express using the supplied workspace and |
---|
54 | project files. Older and the commercial versions can |
---|
55 | be used as well, if they can open the project files. |
---|
56 | Be sure to get your service packs! |
---|
57 | |
---|
58 | The project files can be found in the ide/ directory. |
---|
59 | Please read ide/README.IDE for more info about this. |
---|
60 | |
---|
61 | - GNU toolsets (Cygwin or MinGW) hosted on Windows. |
---|
62 | |
---|
63 | CAUTION: Libraries built by any one of these environments can not be mixed |
---|
64 | with object files from any other environment! |
---|
65 | |
---|
66 | |
---|
67 | HOW TO BUILD FLTK USING MinGW and Cygwin |
---|
68 | ========================================== |
---|
69 | |
---|
70 | This chapter of this document gives a brief overview of |
---|
71 | compiling and using FLTK with the Cygwin and MinGW compiler |
---|
72 | toolkits. Both toolkits provide a build environment based |
---|
73 | around the GNU C/C++ compiler. Further information is |
---|
74 | available from the FLTK website at http://www.fltk.org, such |
---|
75 | as this Howto note: http://www.fltk.org/articles.php?L598 |
---|
76 | |
---|
77 | The Cygwin build environment supplies a library (the Cygwin |
---|
78 | DLL) that is primarily intended to provide a number of |
---|
79 | Unix-like POSIX facilities for programs being ported to the |
---|
80 | Windows environment (Win32 or WinNT). Cygwin also supplies |
---|
81 | a very Unix-like build environment for Windows, including |
---|
82 | the "BASH" Bourne-compatible shell and all of the standard |
---|
83 | Unix file utilities (ls, cat, grep, etc.). |
---|
84 | |
---|
85 | Cygwin is developed by Cygnus (now part of RedHat, Inc). |
---|
86 | Although provided for free download under the GPL, |
---|
87 | distributing programs that require the Cygwin DLL under a |
---|
88 | license other than the GPL requires a commercial license for |
---|
89 | the Cygwin DLL. Native Windows programs that do not require |
---|
90 | the Cygwin DLL (compiled and linked with the "-mno-cygwin" |
---|
91 | option) may be released under any license freely. |
---|
92 | |
---|
93 | Note: Since December 2009, there is a new gcc 4.x compiler |
---|
94 | that doesn't support the -mno-cygwin option anymore. You |
---|
95 | must use the older gcc-3 compiler instead. |
---|
96 | |
---|
97 | An alternative is to install the new (since about Oct. 2010) |
---|
98 | mingw cross tools that support newer gcc compilers for building |
---|
99 | native Windows applications (like -mno-cygwin above). |
---|
100 | Currently you would have to install mingw64-i686-gcc-g++ for |
---|
101 | 32-bit Windows applications (despite its name!), and/or |
---|
102 | mingw64-x86_64-gcc-g++ for 64-bit applications. You may also |
---|
103 | need to install the corresponding '-headers' packages as well. |
---|
104 | Currently these tools support gcc 4.5.x or newer, but the |
---|
105 | setup for FLTK is somewhat more complicated and not yet |
---|
106 | completely supported automatically (you may need to edit |
---|
107 | some lines in the generated makeinclude file). |
---|
108 | |
---|
109 | The MinGW distribution (Minimalist GNU for Windows) provides |
---|
110 | a similar toolset but geared solely towards native Windows |
---|
111 | development without the Unix-like POSIX library. The lack of |
---|
112 | any libraries under the GPL or any other restrictive license |
---|
113 | means that programs built with the MinGW environment may |
---|
114 | always be released under any license freely. MinGW also |
---|
115 | supplies a Unix-like build environment for Windows, |
---|
116 | including MSYS (a Bourne-compatible shell) and the standard |
---|
117 | Unix file utilities (ls, cat, grep, etc.) |
---|
118 | |
---|
119 | If you are not familiar with these GNU-like toolkits please |
---|
120 | refer to the links section later in this note. In particular, |
---|
121 | check out their license conditions carefully before use. |
---|
122 | |
---|
123 | |
---|
124 | The Tools |
---|
125 | ----------- |
---|
126 | |
---|
127 | There are currently three main configurations supported by |
---|
128 | FLTK with the GNU tools: |
---|
129 | |
---|
130 | 1. Cygwin: Built using the Cygwin toolset and using the |
---|
131 | Unix-like POSIX compatibility layer provided by the |
---|
132 | Cygwin DLL. |
---|
133 | |
---|
134 | 2. Cygwin using the "-mno-cygwin" option: Built using |
---|
135 | the Cygwin toolset but not using the Cygwin DLL. |
---|
136 | |
---|
137 | 3. MinGW: Built using the MinGW utilities, compiler and |
---|
138 | tools. This is, in many aspects, analogous to the |
---|
139 | Cygwin "-mno-cygwin" option. This is the recommended |
---|
140 | one if you want to build native Windows programs only. |
---|
141 | |
---|
142 | |
---|
143 | Recommended Command Line Build Environment |
---|
144 | -------------------------------------------- |
---|
145 | |
---|
146 | Our recommendation is to: |
---|
147 | |
---|
148 | 1. Get the current Cygwin toolset. |
---|
149 | |
---|
150 | This can either produce executables that do or do not |
---|
151 | rely on the Cygwin DLL (check licensing) at your |
---|
152 | choice. |
---|
153 | |
---|
154 | 2. Get the latest MinGW toolset. It is recommended that |
---|
155 | you also get the MSYS shell and the msysDTK developer |
---|
156 | toolset. |
---|
157 | |
---|
158 | This will only produce normal Windows native |
---|
159 | executables without any Unix or POSIX compatibility |
---|
160 | layer. |
---|
161 | |
---|
162 | |
---|
163 | See the links section below for more information. |
---|
164 | |
---|
165 | Either option can generate windows-native executables and |
---|
166 | option 1 can provide a Unix-like POSIX portability layer that |
---|
167 | is reliant on a GPLed library. |
---|
168 | |
---|
169 | See the later sections for detailed information about using |
---|
170 | one of these configurations. |
---|
171 | |
---|
172 | |
---|
173 | Prerequisites |
---|
174 | --------------- |
---|
175 | |
---|
176 | In order to build FLTK from the command line, you need to install the MinGW |
---|
177 | environment from www.mingw.org. The graphical installer "mingw-get-inst" can |
---|
178 | be downloaded here for free: |
---|
179 | |
---|
180 | http://www.mingw.org/wiki/Getting_Started |
---|
181 | |
---|
182 | Launch the installer and follow the instructions. In the "Select Components" |
---|
183 | dialog, add "C++ Compiler", "MSYS Basic System", and "MinGW Developer Toolkit". |
---|
184 | Wait for the installer to finish. |
---|
185 | |
---|
186 | After downloading and installing, you need to launch the MinGW Shell through |
---|
187 | the Start menu. |
---|
188 | |
---|
189 | |
---|
190 | Downloading and Unpacking |
---|
191 | --------------------------- |
---|
192 | |
---|
193 | Download FLTK from here: |
---|
194 | |
---|
195 | http://www.fltk.org/software.php |
---|
196 | |
---|
197 | into your home folder. The default location as seen from MSWindows is similar |
---|
198 | to |
---|
199 | |
---|
200 | C:\MinGW\msys\1.0\home\matt\ |
---|
201 | |
---|
202 | If you are familiar with "subversion" and like to stay current with your |
---|
203 | version, you will find the subversion access parameters at the bottom of |
---|
204 | that page. Unpack FLTK into a convenient location. I like to have everything |
---|
205 | in my dev directory: |
---|
206 | |
---|
207 | cd |
---|
208 | mkdir dev |
---|
209 | cd dev |
---|
210 | tar xvfz fltk-1.3.xxxx.tar.gz |
---|
211 | cd fltk-1.3.xxxx |
---|
212 | |
---|
213 | |
---|
214 | Configuring FLTK |
---|
215 | ------------------ |
---|
216 | |
---|
217 | Stay in your FLTK source-code directory. Type: |
---|
218 | |
---|
219 | autoconf |
---|
220 | |
---|
221 | Now configure your FLTK installation: |
---|
222 | |
---|
223 | ./configure |
---|
224 | |
---|
225 | ADVANCED: type "./configure --help" to get a complete list of optional |
---|
226 | configuration parameters. These should be pretty self-explanatory. Some |
---|
227 | more details can be found in README. |
---|
228 | :END_ADVANCED |
---|
229 | |
---|
230 | The configuration script will check your machine for the required resources |
---|
231 | which should all have been part of your MinGW installation. Review the |
---|
232 | Configuration Summary, maybe take some notes. |
---|
233 | |
---|
234 | ADVANCED: some versions of MinGW/Msys are broken and complain about a missing |
---|
235 | --enable-auto-import. The solution is to upgrade to the current release. If |
---|
236 | that is not possible, you can include the --enable-auto-import flag when |
---|
237 | linking: |
---|
238 | ./configure <config flags> LDFLAGS=-Wl,--enable-auto-import |
---|
239 | :END_ADVANCED |
---|
240 | |
---|
241 | |
---|
242 | Building FLTK |
---|
243 | --------------- |
---|
244 | |
---|
245 | Now this is easy. Stay in your FLTK source-code directory and type: |
---|
246 | |
---|
247 | make |
---|
248 | |
---|
249 | The entire FLTK toolkit including many test programs will be built for you. |
---|
250 | No warnings should appear. |
---|
251 | |
---|
252 | (actually, as of Oct 25 2010, quite a lot of warnings related to suggested |
---|
253 | parentheses and others will appear, this is normal and will be fixed. The |
---|
254 | linker will also spit out a bunch of warnings for every program linked. This |
---|
255 | needs to be fixed. Lastly, there is no generator for man pages in a default |
---|
256 | MinGW installation, but you can install man and groff to fix this.) |
---|
257 | |
---|
258 | |
---|
259 | Testing FLTK |
---|
260 | -------------- |
---|
261 | |
---|
262 | After a successful build, you can test FLTK's capabilities: |
---|
263 | |
---|
264 | test/demo |
---|
265 | |
---|
266 | |
---|
267 | Installing FLTK |
---|
268 | ----------------- |
---|
269 | |
---|
270 | If you did not change any of the configuration settings, FLTK will be |
---|
271 | installed in "/usr/local/include" and "/usr/local/lib" by typing |
---|
272 | |
---|
273 | make install |
---|
274 | |
---|
275 | It is possible to install FLTK in user space by changing the installation path |
---|
276 | to a location within the user account by adding the "--prefix=PREFIX" parameter |
---|
277 | to the "./configure" command. |
---|
278 | |
---|
279 | |
---|
280 | Creating new Projects |
---|
281 | ----------------------- |
---|
282 | |
---|
283 | FLTK provides a neat script named "fltk-config" that can provide all the flags |
---|
284 | needed to build FLTK applications using the same flags that were used to build |
---|
285 | the library itself. Running "fltk-config" without arguments will print a list |
---|
286 | of options. The easiest call to compile an FLTK application from a single |
---|
287 | source file is: |
---|
288 | |
---|
289 | fltk-config --compile myProgram.cxx |
---|
290 | |
---|
291 | "fltk-config" and "fluid" will be installed in "/usr/local/bin/" by default. |
---|
292 | I recommend that you add it to the command search path. |
---|
293 | |
---|
294 | |
---|
295 | |
---|
296 | HOW TO BUILD FLTK USING VISUAL STUDIO 2008 |
---|
297 | ============================================ |
---|
298 | |
---|
299 | |
---|
300 | Prerequisites |
---|
301 | --------------- |
---|
302 | |
---|
303 | In order to build FLTK from within VisualStudio 2008, you need to install the |
---|
304 | VisualC developer environment from the Microsoft web site. The Express edition |
---|
305 | is free of charge and sufficient to develop FLTK applications: |
---|
306 | |
---|
307 | http://www.microsoft.com/express/Downloads/ |
---|
308 | |
---|
309 | You must make sure that at least VisualStudio 2008 Service Pack 1 is installed |
---|
310 | or building FLTK on a multicore CPU will be very painful! |
---|
311 | |
---|
312 | |
---|
313 | Downloading and Unpacking |
---|
314 | --------------------------- |
---|
315 | |
---|
316 | Download FLTK from here: |
---|
317 | |
---|
318 | http://www.fltk.org/software.php |
---|
319 | |
---|
320 | If you are familiar with "subversion" and like to stay current with your |
---|
321 | version, you will find the subversion access parameters at the bottom of |
---|
322 | that page. |
---|
323 | |
---|
324 | Unpack FLTK by using an appropriate unpacker and copy the new folder into a |
---|
325 | convenient location. I have set up a "dev" folder in my home folder for all |
---|
326 | my projects. |
---|
327 | |
---|
328 | |
---|
329 | Configuring FLTK |
---|
330 | ------------------ |
---|
331 | |
---|
332 | Launch VisualStudio. Open the project file in |
---|
333 | |
---|
334 | ...\fltk-1.3.xxxx\ide\VisualC2008\fltk.sln |
---|
335 | |
---|
336 | Choose "Debug" or "Release" mode from the "Solution Configurations" menu. |
---|
337 | |
---|
338 | |
---|
339 | Building FLTK |
---|
340 | --------------- |
---|
341 | |
---|
342 | Use the context menu of the "demo" project to "Set as StartUp Project". Then |
---|
343 | select "Build Solution" from the "Build" menu or press F7 to build all |
---|
344 | libraries. |
---|
345 | |
---|
346 | VisualC 2008 has a bug that messes up building a Solution on multicore CPUs. |
---|
347 | Make sure that Visual Studio 2008 Service Pack 1 is installed or, as a |
---|
348 | workaround, set the "maximum number of parallel project builds" to 1 (Tools > |
---|
349 | Options > Projects and Solutions > Build and Run > maximum number of parallel |
---|
350 | project builds). Also, repeating the build command two or three times may |
---|
351 | clear unresolved reference errors. |
---|
352 | |
---|
353 | |
---|
354 | Testing FLTK |
---|
355 | -------------- |
---|
356 | |
---|
357 | Select "Start Debugging" from the "Debug" menu or just press F5 to run the |
---|
358 | Demo program. Use "Demo" to explore all test programs. |
---|
359 | |
---|
360 | |
---|
361 | Installing FLTK |
---|
362 | ----------------- |
---|
363 | |
---|
364 | The default location for VisualC 2008 libraries and headers is here: |
---|
365 | |
---|
366 | C:\Program Files\Microsoft Visual Studio 9.0\VC\ |
---|
367 | |
---|
368 | It is possible to move the FLTK libraries, headers, and Fluid into the |
---|
369 | respective subdirectories, so that they are available for future development |
---|
370 | without adding link and include paths to the solution. |
---|
371 | |
---|
372 | copy the entire FL directory into the include path |
---|
373 | |
---|
374 | copy all .lib files from the fltk lib directory to the VC lib directory |
---|
375 | |
---|
376 | copy fluid.exe in the fluid directory to the bin directory |
---|
377 | |
---|
378 | I highly discourage using dll's (dynamically linking libraries) on MSWindows |
---|
379 | because they will require an installation process and likely cause version |
---|
380 | conflicts. Use the static .lib libraries instead. |
---|
381 | |
---|
382 | |
---|
383 | Creating new Projects |
---|
384 | ----------------------- |
---|
385 | |
---|
386 | This chapter assumes that libraries and headers are copied into |
---|
387 | |
---|
388 | C:\Program Files\Microsoft Visual Studio 9.0\VC\ |
---|
389 | |
---|
390 | Create a new project of type "General", "Empty Project" and add a simple "C++" |
---|
391 | file to it. The FLTK "hello" source code is a good base. |
---|
392 | |
---|
393 | Now open the Project Properties dialog and add "Comctl32.lib" and all the FLTK |
---|
394 | libraries that you want to use (at least "fltk.lib") to Additional Dependencies |
---|
395 | (Configuration Properties > Linker > Additional Dependencies). In the same |
---|
396 | dialog, add "WIN32" to the C++ Preprocessor Definitions (Configuration |
---|
397 | Properties > C/C++ > Preprocessor > Preprocessor Definitions). |
---|
398 | |
---|
399 | Compile and run your test program with F5. |
---|
400 | |
---|
401 | You can also include .fl resources: add a new Header file to your project, but |
---|
402 | let the name end in .fl. Right-click and select "Open with...". Add "fluid.exe" |
---|
403 | from the "bin" directory and set it as the default editor. |
---|
404 | |
---|
405 | To automatically compile .fl files, open the Properties editor and set the |
---|
406 | Custom Build Steps to: |
---|
407 | |
---|
408 | Command Line: fluid.exe -c $(InputPath) |
---|
409 | Description: Compiling Fluid .fl file |
---|
410 | Outputs: $(InputDir)$(InputName).cxx; $(InputDir)$(InputName).h |
---|
411 | |
---|
412 | Now add the generated .cxx file to your project as well. Whenever the .fl file |
---|
413 | is changed, the corresponding .cxx file will be recompiled. |
---|
414 | |
---|
415 | |
---|
416 | |
---|
417 | HOW TO BUILD FLTK USING VISUAL STUDIO 2010 |
---|
418 | ============================================ |
---|
419 | |
---|
420 | |
---|
421 | Prerequisites |
---|
422 | --------------- |
---|
423 | |
---|
424 | In order to build FLTK from within VisualStudio 2010, you need to install the |
---|
425 | VisualC developer environment from the Microsoft web site. The Express edition |
---|
426 | is free of charge and sufficient to develop FLTK applications: |
---|
427 | |
---|
428 | http://www.microsoft.com/express/Downloads/ |
---|
429 | |
---|
430 | |
---|
431 | Downloading and Unpacking |
---|
432 | --------------------------- |
---|
433 | |
---|
434 | Download FLTK from here: |
---|
435 | |
---|
436 | http://www.fltk.org/software.php |
---|
437 | |
---|
438 | If you are familiar with "subversion" and like to stay current with your |
---|
439 | version, you will find the subversion access parameters at the bottom of |
---|
440 | that page. |
---|
441 | |
---|
442 | Unpack FLTK by using an appropriate unpacker and copy the new folder into a |
---|
443 | convenient location. I have set up a "dev" folder in my home folder for all |
---|
444 | my projects. |
---|
445 | |
---|
446 | |
---|
447 | Configuring FLTK |
---|
448 | ------------------ |
---|
449 | |
---|
450 | Launch VisualStudio. Open the project file in |
---|
451 | |
---|
452 | .../fltk-1.3.xxxx/ide/VisualC2010/fltk.sln |
---|
453 | |
---|
454 | Choose "Debug" or "Release" mode from the "Solution Configurations" menu. |
---|
455 | |
---|
456 | |
---|
457 | Building FLTK |
---|
458 | --------------- |
---|
459 | |
---|
460 | Use the context menu of the "demo" project to "Set as StartUp Project". Then |
---|
461 | select "Build Solution" from the "Build" menu or press F7 to build all |
---|
462 | libraries. |
---|
463 | |
---|
464 | |
---|
465 | Testing FLTK |
---|
466 | -------------- |
---|
467 | |
---|
468 | Select "Start Debugging" from the "Debug" menu or just press F5 to run the |
---|
469 | Demo program. Use "Demo" to explore all test programs. |
---|
470 | |
---|
471 | |
---|
472 | Installing FLTK |
---|
473 | ----------------- |
---|
474 | |
---|
475 | The default location for VisualC 2010 libraries and headers is here: |
---|
476 | |
---|
477 | C:\Program Files\Microsoft Visual Studio 10.0\VC\ |
---|
478 | |
---|
479 | It is possible to move the FLTK libraries, headers, and Fluid into the |
---|
480 | respective subdirectories, so that they are available for future development |
---|
481 | without adding link and include paths to the solution. |
---|
482 | |
---|
483 | copy the entire FL directory into the include path |
---|
484 | |
---|
485 | copy all .lib files from the fltk lib directory to the VC lib directory |
---|
486 | |
---|
487 | copy fluid.exe in the fluid directory to the bin directory |
---|
488 | |
---|
489 | I highly discourage using dll's (dynamically linking libraries) on MSWindows |
---|
490 | because they will require an installation process and likely cause version |
---|
491 | conflicts. Use the static .lib libraries instead. |
---|
492 | |
---|
493 | |
---|
494 | Creating new Projects |
---|
495 | ----------------------- |
---|
496 | |
---|
497 | This chapter assumes that libraries and headers are copied into |
---|
498 | |
---|
499 | C:\Program Files\Microsoft Visual Studio 10.0\VC\ |
---|
500 | |
---|
501 | Create a new project of type "General", "Empty Project" and add a simple "C++" |
---|
502 | file to it. The FLTK "hello" source code is a good base. |
---|
503 | |
---|
504 | Now open the Project Properties dialog and add "Comctl32.lib" and all the FLTK |
---|
505 | libraries that you want to use (at least "fltk.lib") to Additional Dependencies |
---|
506 | (Configuration Properties > Linker > Additional Dependencies). In the same |
---|
507 | dialog, add "WIN32" to the C++ Preprocessor Definitions (Configuration |
---|
508 | Properties > C/C++ > Preprocessor > Preprocessor Definitions). |
---|
509 | |
---|
510 | Compile and run your test program with F5. |
---|
511 | |
---|
512 | You can also include .fl resources: add a new Header file to your project, but |
---|
513 | let the name end in .fl. Right-click and select "Open with...". Add "fluid.exe" |
---|
514 | from the "bin" directory and set it as the default editor. |
---|
515 | |
---|
516 | To automatically compile .fl files, open the Properties editor and change the |
---|
517 | Element Type to Custom Build and click Apply. Now set the |
---|
518 | Custom Build Steps to: |
---|
519 | |
---|
520 | Command Line: fluid.exe -c %(FullPath) |
---|
521 | Description: Compiling Fluid .fl file |
---|
522 | Outputs: $(InputDir)$(InputName).cxx; $(InputDir)$(InputName).h |
---|
523 | |
---|
524 | Now add the generated .cxx file to your project as well. Whenever the .fl file |
---|
525 | is changed, the corresponding .cxx file will be recompiled. |
---|
526 | |
---|
527 | |
---|
528 | |
---|
529 | FREQUENTLY ASKED QUESTIONS |
---|
530 | ============================ |
---|
531 | |
---|
532 | |
---|
533 | Why does a console window appear when I run my program? |
---|
534 | --------------------------------------------------------- |
---|
535 | |
---|
536 | Windows has a flag that determines whether an application |
---|
537 | runs in the foreground with a console or in the background |
---|
538 | without a console. Use the "-mwindows" option to make your |
---|
539 | application run in the background and "-mconsole" to run in |
---|
540 | the foreground. |
---|
541 | |
---|
542 | Keep in mind that a windows application cannot send output |
---|
543 | to stdout, even if you run it from an existing console |
---|
544 | application. |
---|
545 | (Note: A special case of this exists if running a MinGW |
---|
546 | application from the command line of an MSYS shell, when an |
---|
547 | application is able to write to stdout, even if compiled with |
---|
548 | "-mwindows". The same applies to Cygwin.) |
---|
549 | |
---|
550 | |
---|
551 | How do I get OpenGL to work? |
---|
552 | ------------------------------ |
---|
553 | |
---|
554 | Both builds should automatically support OpenGL. |
---|
555 | |
---|
556 | The configuration file config.h has a number of settings |
---|
557 | which control compile-time compilation. One such setting is |
---|
558 | "HAVE_GL". This may be set to 0 to disable Open GL operation. |
---|
559 | Changing the line in config.h to |
---|
560 | |
---|
561 | #define HAVE_GL 1 |
---|
562 | |
---|
563 | will change this to compile and link in OpenGL. |
---|
564 | |
---|
565 | |
---|
566 | |
---|
567 | LINKS |
---|
568 | ======= |
---|
569 | |
---|
570 | The following links may be of use: |
---|
571 | |
---|
572 | 1. Main Cygwin homepage: |
---|
573 | |
---|
574 | http://www.cygwin.com/ |
---|
575 | |
---|
576 | 2. Main Mingw homepage: |
---|
577 | |
---|
578 | http://www.mingw.org/ |
---|
579 | |
---|
580 | In particular look for the MinGW FAQ at this link for |
---|
581 | a lot of useful Mingw-native development |
---|
582 | documentation. |
---|
583 | |
---|
584 | |
---|
585 | 3. Check out the FLTK newsgroups at the FLTK homepage: |
---|
586 | |
---|
587 | http://www.fltk.org/ |
---|
588 | |
---|
589 | Its archival search facilities are EXTREMELY useful |
---|
590 | to check back through previous problems with this |
---|
591 | sort of configuration before posting new questions. |
---|
592 | |
---|
593 | 4. GNU Compiler Collection (GCC) compiler homepage: |
---|
594 | |
---|
595 | http://gcc.gnu.org/ |
---|
596 | |
---|
597 | 5. OpenGL page - for OpenGL and GLUT libs |
---|
598 | |
---|
599 | http://www.opengl.org/ |
---|
600 | |
---|
601 | |
---|
602 | |
---|
603 | DOCUMENT HISTORY |
---|
604 | ================== |
---|
605 | |
---|
606 | Oct 25 2010 - matt: restructured entire document and verified instructions |
---|
607 | Dec 20 2010 - matt: merged with README.win32 |
---|
608 | Dec 22 2010 - AlbrechtS: added newer Cygwin (cross/mingw-w64) options |
---|