Saturday, January 27, 2007

wxWidgets 2.8 not working with Windows SDK

i recently formatted my harddisk and reinstalled Windows, so i started installing applications i normally use. that included VC++ Express, and since i develop applications using it for the Win32 platform, i would normally have installed the Platform SDK. however, i'd recently obtained the Windows SDK, so i used that in lieu of the PSDK. i mean, the WinSDK seems to be the successor to the PSDK, so why use older headers and libs? or so i thought. everything went smooth, and i even integrated the WinSDK with VC++ with a single click (configuring VC++ itself for native Win32 apps was a little more roundabout; see this [link]article[/link] for help). so far, so good.

since i was using wxWidgets for an application i was writing before the format, i downloaded it again and started the commandline build, according to the time-honoured instructions in the source archive. i started the build and almost immediately got shock #1: wxWidgets (or specfically, the TIFF library bundled with it) wouldn't build because windows.h was missing. as i'd integrated with VC++, i was surprised, to say the least. i checked the VC++ directory options and found nothing wrong, and windows.h was supposed to be available. checking the INLCUDE environment variable let me know that the WinSDK hadn't set environment variables when installing. after fixing it, i sat back to enjoy my build procdure until i got shock #2: some platform-specific code wasn't building. since i'd already built that version of wxWidgets before without problems, i had to surmise that it was the WinSDK acting up. installing the PSDK and removing the environment variable settings i created for the WinSDK allowed wxWidgets to build without fuss.

i'm not sure if it's the wxWidgets team or Microsoft i should blame, but since Microsoft is the company everyone loves to hate (in this case, more because the PSDK worked previously), i'll say Microsoft wasn't on the up-n-up, or why would they change the API so it would break existing code? whatever, anyway. the main point is that wxWidgets 2.8 (and most likely lower versions) doesn't work unpatched with the WinSDK, as maybe a few people would have found out by now. so version number addict, chill out. today's Win32 apps should still work on Windows Vista, so it's not that big a problem anyway. later.

Wednesday, January 24, 2007

internet annoyances

here in school, the cafe i use is served by the school. recently the school's servers have been messing up. i've been in the situation of a site's favicon being retrieved, and a DNS error page. obviously, the site's domain name was resolved, or was it via magic the favicon showed up? i hadn't bookmarked it anywhere! even Google and Microsoft aren't left out. i'm not sure which is more ridiculous - the former scenario or the one where i can visit the main Microsoft site but i can't download anything from its subdomains. eek!

Sunday, January 21, 2007

when software does what it should

…but that isn't what you want it to do, what do you call that? i downloaded BO2K, but my antivirus program, AVG Free 7.5, which runs automated scans every day at 8am by default (quite useful, actually) always picks it up. now that's what it's supposed to do, but that not what i want it to do. i'd rather it left the BO2K alone. i was going to use it for remote admin, until i remembered UltraVNC. still, BO2K has features such as remote process listing and whatnot, and i really would like that, rather than just have access to the remote machine's desktop and filesystem. ah, well. you can't win them all, can you?

love...why does it seem so hard?

i read an instant message between a guy and a girl, and my heart went out to the girl. here the guy was, trying to milk money out of her, and she just wanted someone to make her feel special. no, i'm not absolving her of blame, but i can understand. because i'm human. because i've felt it too. the ache. times i have passed a couple and i wish i were him. we're created to feel wanted by someone of the opposite sex. it's natural.

the problem occurs when we let the desire for relevance run uncontrolled. there are so many women who would rather not have sex, but to satisfy the man in their life, they submit themselves unwillingly to sex - psychological rape, i call it. many men empty their bank accounts just to make a woman happy. there are so many stories of people who take things from their loved ones that they wouldn't take from anyone else…people losing respect, people selling their values for a fleeting satisfaction. and it makes me sad.

i'm not immune. i put up a brave front, saying things like, "women are irritating", or "women are troublesome", or the latest: "when most women run their configuration wizards, they seem to almost always check the 'Be Troublesome' checkbox". but like everyone else, i just want to love someone and be loved by them. sometimes i just want someone to hug me and the feeling can sometimes be so intense, it scares me. and that's one problem with many people: they are scared about the depth of longing for relevance. it won't be satisfied with one or many flings. there's a deep-seated cry in each of us to love and be loved. the writer of the book of Ecclesiastes in the Bible put it well when he said that God had "…put eternity in the hearts of men."

if God put it there, then nothing in this world will ever satisfy that longing. i know. i got so mixed up that at one time in my life i had a list of almost ten women i had different levels of non-negligible attraction to. d-uh! i can't be with all of them, can i? so i stayed away, using my mind and wit as both a shield and a weapon of offense. but i tired of it. i wounded people i cared for, simply because i couldn't handle it. it hasn't stopped in a sense, but i have changed in one simple way: instead of trying to give myself excuses for not being in a romantic relationship and trying to explain away the attraction i felt for someone, i faced it. i began to believe that i am a desirable and attractive young man (i still need to learn the secret arts of cosmetics usage), and that even though i was attracted to people, i didn't have to excuse it away - or do anything about it. yes, i'm self-conscious around such people, but that's about it.
more importantly, i'm beginning to look more to my relationship with God and to myself for my sense of importance. i'm putting a value on myself. i don't need anyone to make me whole but God. and He's not doing a lousy job of it - that much i can tell you. i'm not saying my insecure days are over…but i can look at myself in the mirror and thank God for the day He created me - someone else is going to, someday very soon do the very same thing! and ladies, hands off - this dude is expensive stuff! it took a human life to buy me - so nothing less will do for the rental value! sayonara!

Saturday, January 20, 2007

Consolas font from Microsoft

i've been programming for a little while with Microsoft Visual C++ 2005 Express, but i never had so much fun reading/writing code as two days ago when i changed the editor font to Consolas. Consolas is one of a number of new fonts developed specifically with Windows Vista in mind, but Microsoft in its not-so-recently-hatched generosity is giving it away for free for developers (obviously, pretty much anyone can get at least Consolas, not to mention that the fonts also came with both the beta and release versions of Office 2007). for a monospaced font, it's really more legible than Courier. i guess if you use a version of Visual Studio the setup file would automatically set Consolas as the editor font, but it seems not to work with the Express Editions. typical, i forgot all about the installed font the next time i ran Visual C++, but something got me looking in the options (something i rarely do normally) and i set the editor font (i generally don't do this either. the closest i've come to doing it is changing the display font for SciTE from monospaced).

by now i guess i probably got you at least a mite interested, so let me stop advertising Microsoft and just give you the link to the download.

Friday, January 19, 2007

coding among thorns...

i've been developing a small app that required an embedded database. i'd used SQLite with a degree of success, but i wanted a change, especially when someone said something about the files getting easily corrupted. my next choice was embedded Firebird. since i was writing a C++ application, i decided to use the default C++ API for Firebird, IBPP.

developing this app has been a great learning experience. for instance, i found out that using std::vector as a container calls the copy constructor for stored objects. there's a class in my code that has a private copy constructor, mainly to prevent me from trying to make copies of existing objects (if each object is to be completely unique, there'd be a need for that, wouldn't there?). i wasn't sure about it, so i stored pointers to objects of that class in the std::vector. later, i duplicated the code relating to the vector and tried using actual objects. my compiler (Visual C++ 2005 Express) gave me a major error in the vector include header, of all places! heh!

my app i going along fine, and i hope to be done with it by Saturday. on the subject, Sleepcat Software was bought by Oracle. interestingly, i just found out this morning while googling for embedded databases, even though the announcement is dated February last year.

saa te, later!

Wednesday, January 17, 2007

wisdom...on much more than 3d

i've known about SomeArtist's blog on 3d modeling for some time now, but i really didn't look up his posts. he has quite a bit to talk about, but even if you're not a 3D modeler, i suggest you look up his site. his tips are applicable to more than just 3D, because he talks about thinking, not modeling per se.

so go on, have a look see.

Tuesday, January 09, 2007

woes...gone?

so, here i am, back to coding in the middle of the night (it's past 2am here). i found that compiling IBPP and linking the created object into my application only worked until i made a function call, namely to create an IBPP::Database object. then all hell broke loose. so, i did the recommended thing and added all the IBPP source files to my project, and recompiled after removing all references to my custom "library". recompiling gave me the (expected) error of complaining about wide (Unicode) characters not being compatible with regular ones. since i only got about 9 or so errors, i started editing the source file (_ibpp.cpp), and converting most references to quoted strings that gave errors to Unicode-compliant strings using the TEXT() macro. the final challenge was a call to std::string::c_str(), so after trying to create my own function to convert from ANSI to Unicode, and failing - i solved that with a cast. i'm not so sure i won't trip up in future, but i'm feeling more confident now - considering the "solution" took less than 15 minutes, and i'd been battling with the problem for over an hour. i could do with some sleep, myself. later!

Monday, January 08, 2007

Update in progress

went to classes for the first time this year. heh. nothing much happening. went over to the wxWidgets forums to gripe about my wxWidgets application linker problem. apparently, i didn't remember signing up, but i had, previously. when i logged in, i decided to look for the problem i was having before griping, and lo and behold, it seems i was using a different configuration (probably trying to build a debug application on the release version of wxWidgets i had, though i'm almost certain i always switched it...). at any rate, it seems the problem was a very common one indeed, judging by the number of people who posted separate threads for it. anyhow, i'm quite glad i'm not alone in this thingy. anyway, i always solved the problem by creating a new project, so i'm not too bothered.

this is totally unrelated, but there's going to be a live Transformers movie! and guess what? Steven Spielberg is the exec producer, with Michael Bay as director! i saw the Japan-only trailer on YouTube. arigato gozaimasu, Spielberg-san, Bay-san! later, then.

Sunday, January 07, 2007

Growing pains

yo. been quite a while, relatively. been trying to code and not being very successful at it. i don't know what happened to me. anyway, i was having problems with some stuff i was doing. compiled FOX, but since it didn't contain the code for some external libraries such as Zlib, i followed the instructions on the site and defined some macros to include them in the build. the library built fine, but the example programs gave me linker errors no end, complaining about multiply defined symbols. had to get rid of the entire library

something similar happened when i actually started working on a project using wxWidgets and IBPP. for some reason, IBPP doesn't support Unicode, or so it seems to me. i built the application (and wxWidgets) with Unicode support, and IBPP choked. the fix: build IBPP as a separate library. fortunately, even though the IBPP team recommends merely including the source into your own code, i built it (quite easily - just compile all_in_one.cpp), eliminating one problem. the other was fixed by including wxWidgets headers before IBPP's since they both declare a macro with the same identifier (_). the clincher came when i edited some code in my skeletal application, and got a wxWidgets linker error about not finding wxStringData::Free(). nowhere in the wxWidgets docs does this method exist, and not even in the library, it seems. pulling out all calls to IBPP didn't fix it - i had to plug the entire app.

i haven't coded in a long while, so maybe that it. and i don't even want to go into the problem of multiply defined symbols due to different runtime libraries. oh, i'm using Visual C++ 2005 Express Edition Service Pack 1. i really was about to give up. i kept thinking, it's the story of my life anyway. i'm not sure maybe it was due to lack of sleep, but i do feel better now, and i guess i'm ready to give it one more shot.

Monday, January 01, 2007

Happy new year!

yes, 2007 is here! and happy new year to you too! so, what are your plans for the year? don't tell me, just make them - and make sure you execute them. plans are no good unless you do something about them. despite that, however, remember that Robert Burns said something about the best laid plans of mice and men gone agly…or something like that. plans are only so good, and are limited to the planner - no human can see the future. that said, it's better to have a plan for the year than just fall through - the plans act as a measuring stick to determine just how successful you've been. well, guess i'll leave you to your planning and scheming for the year. later!