Building my simple BOINC application under Windows

It was developed and tested under FreeBSD. Then I had to compile and build it under Windows.

First I tried Cygwin and failed due to some defenitions missing in Cygwin’s libraries. Or my installed libraries. Heck, it was so many error lines ago, I can’t even remember what it was.

Then I tried Dev-C++. I used the same Cygwin tools, but this time I let Dev-C++ generate a and build from that. First, it found some error in the Makefile (“% missing”). I think I just deleted that line, it was nothing important. Anyway, Cygwin went as far as to the linker stage, at which he couldn’t find the BOINC-specific symols in the supplied libraries.

Of course, the libraries weren’t compiled at that point. So I proceeded to, but that produced some errors, too. After a few hours I gave up.

… Well, not exactly. I went on to “See What the Manual Says!”. It said to build it using MS VC++, Express Edition (which is free).

I downloaded that from my local DC++ network, which was faster.

Also, I installed TortoiseSVN and checked out the BOINC trunks. It was really slow, a tortoise it was, so I copied over the FreeBSD one that was already on the hard drive. Now, adding those files to the local repository was a pain in the ass. Although it turned out I only has to right-click -> TortoiseSVN -> Check for Modifications.

Trying to build the app without the SDK installed yielded no results. No positive results, that is. So I proceeded to download the SDK, as yet again was encouraged in the manual.

Then I ran into a whole heap of linker problems. Jumped aroung with them until 2 past midnight, then remembered my productivity falls dramatically around that period. Went to sleep.

This morning, I understood I should have right-clicked the solution (I added my program to the samples.sln of boinc_samples), checked libboinc and libboincapi as the dependencies for my project. That got rid of boinc-specific symbols not being found. (libboinc and libboincapi were compiled and linked by then.)

Then there were other linker problems: msvcrt.lib (MSVCR80.DLL) had a conflict with one of libboinc.lib’s .objs, and it was turning into a bloody mess.

Guess what? I read the manual.

After that, I changed the /MD option specified to the C/C++ compiler to /MT – link the static multithreading library instead of the dynamic (DLL) one.

Now, a few last words. This would have all lasted for 4 hours instead of 14 if I just sat down and followed the instructions. These hours would be mostly waiting for things to download or compile, and that means I could’ve been doing something else. Which brings us to one conclusion, boys’n’girls:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: