Archive for February, 2008

Win32 odyssey: who needs documentation?

Feb 14 2008 Published by Salvatore Iovene under Software

Dur­ing my cod­ing adven­tures, I have just found myself hav­ing to port an exist­ing Win32 appli­ca­tion to CMake. After writ­ing a mere 283 lines CMakeLists.txt file, and get­ting the appli­ca­tion suc­cess­fully com­pile, I fired it up to see if it worked, of course. I found it fail­ing when doing a WSAA­sync­S­e­lect, and fail­ing there didn’t seem to make any sense. So, to get to the point, I decided I’d just care­fully com­pare the compiler’s options gen­er­ated from CMake with the ones that were in the orig­i­nal Visual Stu­dio project file. After find­ing the dif­fer­ence, I decided I was gonna learn what those flags meant, so I googled for “visual c++ com­piler flags” and guess what? Noth­ing use­ful. The right string to google would be “visual c++ com­piler options”. But before get­ting to it, I had to unsuc­cess­fully go thru “visual stu­dio com­piler options”. You’d think that would cut it, right? Since “visual c++ com­piler options” did it. But, sur­pringly, “visual stu­dio com­piler flags” did actu­ally find what I wanted. Inter­est­ing combination.

I don’t really feel like blam­ing Google on this. Repro­duc­ing the same search pat­tern in the inter­nal Help func­tion of Microsoft Visual Stu­dio gave me the same success/no-success scheme. Besides, the whole point-and-click pro­ce­dure is a ter­ri­bly uncom­fort­able expe­ri­ence. Not only I have to get my hands off my key­board (inher­ently a waste of time), but also do I have to (mind: have to) wan­der my mouse around for a while to get to the information.

So, I won­dered, is there an alter­na­tive? I went to my rxvt ter­mi­nal emu­la­tor (which I run through Cyg­win, can’t really be both­ered with using the native Win­dows Ter­mi­nal), and tried to get some help from cl.exe. No luck. After some try-and-fail recur­sion, the least use­less thing I would find was cl.exe -help which would give me 106 (one hun­dred and six!) lines of doc­u­men­ta­tion. Wow, impres­sive, isn’t it? Com­par­ing, gcc’s man­ual page is 7820 lines, as for the lat­est stable.

2 responses so far