Posts Tagged ‘ Google ’

gtest + CMake + Visual Studio

I should have posted this sooner, but all kinds of things got in the way and… Okay, that was just some lame excuse, it is because my laziness that this site has been left unattended.

I suddenly felt the urge of writing this post because the other day I saw my friend Dat was trying to get gtest to work with Visual Studio but ended up getting cryptic messages from linking errors. This has happened to me before, and I have investigated this issue.

In fact, using gtest library with CMake is fairly easy and straightforward. All you need to do is to find the corresponding library and the include path, and then link the gtest library against the executable. This works without a problem in Linux. However, it becomes a bit tricky when used in Windows (as expected?).

The main issue is the Runtime Library setting in Visual Studio:

By default, it tries to load DLL, but I was feeding it LIB file. No wonder it complains. Suppose I am building in debug mode, I need to specify gtestd.lib to be my target library and select “Multi-threaded Debug (/MTd)” as the runtime library, whereas in release mode gtest.lib needs to be specified and “Multi-threaded (/MT)” should be selected.

So, is there any workarounds to avoid this manual hassle? Sure, simply do

SET(CMAKE_CXX_FLAGS_DEBUG "/MTd")

in the CMakeLists.txt, and it will be set automatically (somehow I was under the impression that I have tested this before and it was not working, but it did work just now).

Of course, you can specifically indicate that you want a DLL to be built in gtest. Yet so far I haven’t found a way to utilize the DLL (such that it can work with /MD or /MDd), I would have to defer this problem to some C++ gurus, i.e. George Toderici (if Google Alert ever alerts him about the existence of this post), to answer.

New Google Calender feature: sync with Microsoft Outlook

Just now when I was creating an event in my Google Calender (GCal) I happened to notice that Google is offering a synchronization service between GCal and MS Outlook.

Aside from this topic itself, I would have to say that Google does have some unique style of “announcing” new features. I don’t know about the situation of technology-savvy people who subscribe to Google’s announcement, but for me I don’t hear rumors, I don’t see official news, I don’t receive email notifications – the advent of a new feature is displayed merely in bold red font in the top toolbar of Google sites, and believe me there is a pretty good chance that it would be overlooked. So it is highly likely to lead to “Hmm, since when did Google begin to have this?” when you are just performing your regular routines with any Google service.

Now back to the new feature GCal offers: 2-way syncing with Microsoft Outlook. Isn’t that great? Previously we were only able to subscribe the GCal’s (assuming multiple calenders serving difference purposes) in Outlook to view them. Event editing had to be done on the server side, but now you can create and edit whichever side you want. On top of that, it is a free service.

That suddenly reminded me that I paid $65 for Spanning Sync for my Mac, which essentially (and only) performs 2-way syncing between GCal and iCal. It is simple but it does its job very well and the customer service has been very responsive. Yet truth to be told, I think $65 is a little bit too expensive for this feature. There is also a subscription option available for $25 a year, but I am just no subscription guy (part of the reason I didn’t buy .mac).

Anyway, since Google released Outlook syncing service. It could indicate that a free iCal syncing service is also in the future plan, which means I might have wasted my bucks.

Not so fast. I downloaded and installed Google Calendar Sync as instructed, but found that only my primary calender in GCal got its way to Outlook. Not surprisingly, I found this when I checked again the Getting Started page:

Keep in mind that it’s not possible to sync events on secondary calendars at this time. Google Calendar Sync will only sync events from your primary Google Calendar and your default Microsoft Outlook calendar.

Hence great new feature for one-calender-for-all users! Good news for multi-calender users because now you know at least Google is working on this 2-way syncing issue. Users who purchased Spanning Sync or BusySync (latest beta added support for 2-way syncing between iCal and GCal, for a cheaper price than Spanning Sync), let’s hope Google does not have support for iCal in the development plan.

Google OS: the omega phase of Google’s monopoly?

A Personal Conjecture

OK, I admit that it is no news since I failed to realize that gOS already entered the stage. But the way I envisioned it, Google is going to introduce their full-fledged web-based operating system sooner or later, or maybe officially sponsor gOS. In fact, it has already been promoting the mobile platform for handheld devices. Think about it, internet access is so ubiquitous that I am willing to bet that most of you cannot stand a computer without internet access. Furthermore the mundane tasks you can possibly do on a regular OS you can possibly do them online. Taking into consideration that Google which offers such unified experience of all these applications is already in a dominating position among its peers, the prediction of its monopoly is not far-fetched. Let’s take a look at what it might take to actually deploy the Google OS (most of which you might have already seen in gOS, yet it is still immature and far from state-of-the-art), when we are under the assumption that connection speed is not a concern.

Hardware Requirement

Google OS will probably require pretty much the same as other operating systems except that internet connection is mandatory. But the specification could be significantly lower.

Software Deployment

Rather than DVDs, possibly one CD is enough for Google OS and drivers since Google OS is based on a browser. Additional applications can be installed along the way.

Access Control

Hopefully it will be as simple as your normal Windows XP or OS X account plus “@gmail.com”. Forget “@google.com”, it is for Google employees exclusively.

Mundane Tasks

Google Docs already provide Office alternatives. Gmail, Google Calendar, and a not-so-full-blown To Do gadget serve to replace Outlook. For IM, Google Talk is the way to go and there are also plenty of web-based IM clients. To view PDFs, a browser plug-in is sufficient. Control Panel or System Preference? How does “Google Control Center” sound?

Entertainment

Songs and videos can be organized and played in a YouTube like fashion. Graphic-intensive games can be a problem though.

Multi-Window View

I have been looking for a dual-pane view plug-in for Firefox so if you know any please let me know. In the future you can probably drag tabbed web pages around just like what you do in regular windows-based systems. Worst case scenario is having multiple instances of the browser.

Development

There is already web based SSH client and hopefully a fully functional web based IDE will come out eventually.

Anti-Virus & Anti-Spyware

This will be worried by Google. Since pretty much everything is on the server side.

Backup Scheme

On regular operating systems you work on local data and backup to remote server/drive, while on Google OS you work on server data and backup to local drive.

There you have it, Google OS! There are might be a myriad of possibilities of implementation but they don’t really matter that much, the only question is when.