Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Tuesday, May 26, 2009

Visual C++ Debug Executables On Nondeveloper Machines

Well, If you need only facts then: Debug builds in Visual C++ include dependency on Microsoft.VC90.DebugCRT.dll which is installed with Visual C++ environment. This builds will not run on client machines even with Visual C++ Runtine Redistributable installed. Only Release build will run on such machines.
And here is the history how did I found this.
Recently I found that I couldn't start my application written in C++ on my netbook. At first I thought that this was the problem with hardware: program was compiled on 64-bit OS and machine and I was trying to run it on 32-bit machine. However I've tried to run program on another 32-bit machines and an attempt was succesfull. But on the forth machine it again failed to start. And by the way it provided a rather meaningless message which suggested to reinstall the problem. In .NET applications such an error is displayed if *.config file of executable has en error in XML syntax. but the was no any *.config file in this application.
I've assumed that there are missing dll file. So I've installed the only dependency that could be in this simple application: Microsoft Visual C++ 2008 Runtime Reditributable. That didn't helped. I've installed 2008 SP1 version. The same result. So I've tried to read the manifest file and found the dependency on Microsoft.VC90.DebugCRT.dll. I've compiled my application as a Release build and manifest included dependency on Microsoft.VC90.CRT.dll and application was starting on all required machines! It seems that debug vresion of C Runtime is distributed only with developer environment.
So the summary: Visual Stusio (or at least Visual C++ Express) is required to be installed to run Debug builds of programs.

Saturday, March 07, 2009

NonLatin symbols in MySQL

While developing my recent program in databases I found that my program on C# doesn't work correctly with onlatin chracters. It happend with recent version MySql.Data connector assembly from MySql. But there was no such problem when I've used old ByteFX.Data assembly. But old connector has some other error (at least when it works with server 5.2). After digesting a problem I found how to make my program work correctly with nonlatin characters. The solution is obvious: program must use a unicode, so here I'll show that to change in configurations of database and cliet software.
  1. Encoding of connection must be Unicode. For this in connection string add this parameter: CharSet=utf8;
  2. Encoding of database also must be Unicode. In my.cnf file following variables must be set to utf8: default-character-set and chracter-set-server
  3. However this helped me only on Linux machine, on Windows MySQL crashed after string with such prameters. So on Windows I found another possible solution: specify charset only for database: CREATE DATABASE dbName CHARACTER SET = utf8;. This solution is more flexible than previous because it affects only your database and not whole server.

Thursday, August 30, 2007

My notebook

Today I have bought a notebook. It's an Acer Extensa 5610. And it is with Vista Home Premium. So soon I will be able to say me opinion about Vista. At first it looks impressively. I hope my new notebook will improve my productivity: now I'm not wired to any particular workplace and can even work in university in my preferred environment.

Soon I'll write about my first impressions!

Tuesday, July 24, 2007

Ubuntu — first try

Recently I've tried to use Ubuntu Feisty Fawn. On virtual machine.

I've tried Linux and FreeBSD a few times before. Not very successful. Though I have to say that these attempts make my brain to think how to use, not just simply "install and use". However I wasn't able to move from familiar Windows environment to unknown *nix.

Some days ago I've decided to try Ubuntu on virtual machine. I've used two of them: VM and VirtualBox.

VirtualBox was the first. What was bad: progress bar of user interface which must be orange was instead almost invisible. But that is not serious bug. Much worse was that while installing OS on virtual HDD it failed on some step without any warning and I wasn't able to start OS from hard drive, the only choice was live-cd but that is not very good because I need to install some software on my OS to feet my purposes.

Then I've tried VM player. It hadn't got problems with progress bar and it installed successfully and now I can run it from virtual HDD. But... I couldn't find how to switch my audio card to OS (that was rather easy on VirtualBox) and, what is much more worse, it had problems with Internet. Internet is too much important for me to use OS without access to it.

As a result of this faulty attempts I've putted Ubuntu on virtual machine in a long-term box and decided.... to try it on real machine. I've already wrote that I'm studying C# now, so I don't think I could leave Windows for a long time, but I could try Ubuntu as an OS for browsing Internet :) Time will show...