Category Archives: Windows

CMake so far

I’ve been investigating cmake at work as a better build system for our cross platform C based projects. I’m thinking about starting up a third one, so now is the prefect time to really go after this as for one project we have a build system per platform and on the other we have two build systems. When you mix in wanting to make universal binaries on OS X its yet another wrinkle. cmake was recently chosen by KDE to be the build system for KDE4 since KDE4 will be fully supporting Windows and OS X, as well as the other unicies via X. I used a small convenience library as the test piece as it was only two files big, but it had the requirement of at least two external libraries.

Some pros for cmake that I’ve found so far (compared to what we’ve been doing):

  • support a big number of build environments on the different platforms. On windows it sports 11 different build environments, OS X 3, and Linux 2. For OS X and Linux, you only really need those two or three, but on windows it supports 4 different versions of visual studio as well as Borland, Watcom, and gcc.
  • Takes care of the flags needed to build executables and libraries on those supported platforms.
  • Does out of source builds on windows.
  • Tracks dependences on all platforms without an external application
  • Does search and replacing on things like .in files without having to call out to external applications

Some cons I’ve found so far:

  • The documentation on the web page is pretty horrid. The book is pretty bad too, especially when compared to other technical books I’ve read recently, but its much better than the website. When combined with the book and experimentation, the FAQ is helpful.
  • Doesn’t really have the concept of convenience libraries. This will result in common files being built multiple times. I don’t like this, but its not fatal.
  • The CMakeCache is getting in my way more than being a help, but that might be the side effect of my learning process right now.
  • I haven’t yet figured out how to make it query the person compiling the app if it can’t find something. This may not be possible. At the very least I want to make it bitch and bomb out if a required dependency isn’t there. I just haven’t found it yet, I’m thinking.

This isn’t an exhaustive review yet, but I wanted to get down what was in my mind before I forgot. I had just found the convenience library thing and that’s what inspired the post. My next step is to move a full existing project over to being built with cmake. This is a library that depends on expat, boost, curl, antlr, and (optionally) swig. Should be a good challenge.

[Update 11:58: I found an answer to my “bomb out if the dependencies are missing” question. Thanks, devchannel!]

[Update 2:51: No this isn’t here just for g0ff. Turns out the latest cmake has modules to Find Java, Doxygen, Boost, Curl, Expat, and Swig already. It looks like just custom items for antlr and cppunit will be needed. Also, it only ever wants to link against dynamic libraries, not static ones. That’s a PITA.]

[Update 5:52: Okay, the convenience library thing is upsetting.  The output of what I was working on is a static library and there are same example command line tools that link against it.  From my reading of the cmake stuff, I should just include the library source files to the target for the executables being created.  The problem with this is for n example programs, I’m compiling librets n times.  This doesn’t seem very optimal.]

ezRETS

I normally try to avoid posting about work, as that way often leads to being fired or other unpleasentness. However, I think its okay in this case.

I’m really excited about our beta release of ezRETS an ODBC driver for RETS data sources. This has been one of the coolest projects I’ve worked on for a long time.

We just put out the windows binary today, but the source is available via subversion and if you can build it, it’ll run under Linux or Windows. OS X to follow. We will probably get out a source release next week, we just didn’t have time this week.

Today’s computer hatred brought to you by INTERNAL COMPILER ERROR

Generally, I really love working with computers. I can’t imagine what else I’d do as a profession if I wasn’t doing what I do. However, there are some bugs on some days that just piss me off so much I need a place to vent. Good thing I have a blog.

Anyway, it looks like if you’re trying to compile things on Windows XP SP2 using Visual C++ with pre-compiled headers turned on and your code is hosted on a network drive hosted by samba, you’ll cause:

fatal error C1001: INTERNAL COMPILER ERROR
(compiler file ‘f:\vs70builds\3077\vc\Compiler\Utc\src\P2\p2symtab.c’, line 1609)

http://lists.samba.org/archive/samba/2005-January/099421.html

This is probably one of those bugs that is half samba’s fault and half VC++’s fault. That being said, I also found a report that looked similar, but with win2k and offline files.