ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

sections
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


8 - The Development Environment

8.01 - There seems a lot of detail in this environment, not like Visual C++/Visual BASIC/Borland C++ Builder/etc
8.02 - What's a Makefile?
8.03 - What's the relationship between Cygwin/Linux/Windows
8.04 - How do I set up Cygwin and the SDK?
8.05 - Why do Linux source files look funny?
8.06 - Where can I get a good editor?
8.07 - I would like to see feature 'x' in the Form Editor
8.08 - How do I perform initialization in the windows created with the Form Editor?
8.09 - What about Menus and Radio Buttons in the Form Editor?
8.10 - I want to edit multiple windows - how do I do that?
8.11 - I want to create my functions private in the Form Editor - how?



8.01 - There seems a lot of detail in this environment, not like Visual C++/Visual BASIC/Borland C++ Builder/etc
We've very blessed on the Windows platform. We have lots of IDEs (Integrated Development Environments) that handle (and hide) the details. But real men (and women) work low level, and it'll only improve your life (and job prospects) to tinker with files, directories, makefiles, etc. As well, since the toolset and compiler run under Linux, you're getting a gentle introduction into the Next Big Thing.

8.02 - What's a Makefile?
Few programs are a single source (.C/.CPP) file. Some are so big that compiling all of them each time takes quite a while. A makefile allows you to compromise, and only compile what really needs updating. A makefile primarily tells the compiler file dependencies; which file depends on another to be compiled. Timestamps are used to determine when changes have been made. For example, 'myfile.cpp', reading 'myfile.h', compiles to 'myfile.o'. Obviously, when you change myfile.h, you need myfile.cpp to recompile (the alternative is very nasty). The makefile is used to indicate that myfile.cpp is dependant on myfile.h - when that timestamp changes (becomes later than the myfile.o timestamp), it indicates it's time to recreate myfile.o by recompiling.

8.03 - What's the relationship between Cygwin/Linux/Windows
Simply put, Linux is an operating system like Windows; Cygwin bridges the gap by letting Linux binaries (fancytalk for executables) run under Windows. It does it by providing an emulation layer to convert the calls to Linux routines into equivalents in Windows. It gives you the best of both worlds, access to the wealth of Windows tools, while developing in Linux.

8.04 - How do I set up Cygwin and the SDK?
The long answer wouldn't fit here. The short answer is FOLLOW THE DIRECTIONS EXACTLY. I cannot emphasize this enough. The directions on the Franklin website are clear and complete. However, 'obvious' things under Windows/DOS aren't under Linux. Most notably, Linux is extremely case sensitive for files/directories. Check your case constantly. Also, the slashes are reversed - howto\example.cpp is now at howto/example.cpp.

8.05 - Why do Linux source files look funny?
Linux and Windows differ on the end of line characters. In Linux, only the newline (hex 0xA) is used, whereas Windows uses both newline and return (hex 0xD). That's why a Linux source file loaded into Notepad looks wrong (although WordPad works fine). The solution is to find a program editor that works handles both; most do.

8.06 - Where can I get a good editor?
There are plenty of options on the Internet, both free and for a price. Although you can use WordPad, the formatting, syntax highlighting, etc of a real programming editor makes life a lot easier. I use the Borland 4.5 IDE that came with my old Borland compiler; best to use whatever you're comfortable with. You'll be using it a lot, so it pays to invest in a good tool.

8.07 - I would like to see feature 'x' in the Form Editor
The Form Editor project is under the supervision of Franklin. For all features and suggestions, please forward them to Franklin. If they get enough interest, the project can always be revisited, and features added.

8.08 - How do I perform initialization in the windows created with the Form Editor?
Currently the editor doesn't support constructor code. However, an easy way around is to define a function called Initialize(), and whenever the window is created with new, immediately call this function. The Form Editor tutorial shows how this is done.

8.09 - What about Menus and Radio Buttons in the Form Editor?
These can be added in a later version - however, there are no plans to add those features currently.

8.10 - I want to edit multiple windows - how do I do that?
You can open multiple instances of the Editor - keep them all running, each with a different window to edit.

8.11 - I want to create my functions private in the Form Editor - how?
When you enter your code into the class text section, all entries are considered public. However, if you enter the private keyword, all entries following that are private. You can alternate public and private entries as you wish to hide or reveal variables and functions to outside code.



Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice