Wednesday, February 17, 2010

OOP344: Creating an editor

Before things get any more hectic with this OOP344 project (in which we're to create a programming editor, a la vi), a few things:

1) Compiling can be a pain in the butt

I have never compiled anywhere besides linux (on Seneca's matrix server) before, so learning to compile on Visual and Borland was a frustrating experience. More than anything else, it was being told that the library I was trying to #include did not exist.

To compile on Borland, I first had to create a batch file that would add to $path the path-file to my Borland compiler. I still have not figured out a way to set this permanently, so for now I must run it everytime I need to use Borland. It's a simple .bat file with one line:

set path=%path%;C:\Borland\BCC55\Bin

I had to create a bcc32.cfg file in the Bin. All it contains is:

-I"c:\Borland\Bcc55\include"
-L"c:\Borland\Bcc55\lib"

It cuts down the typing I have to do when compiling because it automatically includes the libraries I need to run my program.

Visual and Linux were easier, though with Linux, I forgot to "-lncurses" at first.

2) I'd been accidentally committing to trunk all along

What I'd done was copy and paste the PRJ file (which contains the .c's and .h's for the project) from trunk to my workspace. I thought that because it was in my workspace, committing any changes I made was ok. I was under the impression that anytime people committed to trunk, everyone's version of similarly named files in trunk would be updated, too. After all, how else is everyone going to get synched?

This issue has been fixed now. I've done a fresh checkout, and after all the editing I've done to my code, I'm going to be ready to merge my code with the trunk code soon.