2012年5月28日 星期一

env variable and Visual studio

Sometimes VS uses the settings in the env variable. When you modified those variables, you need to close the VS and re-open it and those changes will take effect.

"MSVCRTD.lib(MSVCRTD.dll):errorLNK200

http://www.cppblog.com/tx7do/archive/2006/09/16/12555.aspx

2012年5月27日 星期日

2012年5月22日 星期二

Visual Studio改compile flag...

This is for my own:

When doing porting, i.e. from WinCE to Win32, some Macro flags will not be found. When this happens:
1. Find the .vcproj file
2. in the file, find "InheritedPropertySheets"
3. open those .vsprops files indicated in step 2.
4. modify those suspecious flags in the files found step 3.

2012年5月16日 星期三

Compiling flags used in porting from wince to win32

Today I was porting the code from WinCE platform to Win32 environment.
I used the following flag, since I am lazy and not sure which flag is correct for Win32:

 #ifdef WIN32 || __WIN32 || __WIN32__  
 #include <windows.h>                                                                           // Mod: 2007.11.05 S.Ota  
 #endif  


Things like that...

jni and javah

1. javah usage:

    type this command:
javah -jni com.XXX.XXX.className
    It will generate a .h file. Using this .h file, we can start to edit the corresponding .cpp file.


2. JNI unsatisfied link error

    When writing JNI programs, sometimes we see this errors. It is hard and troublesome to find which part of the code actually went wrong. My experience is to check the following:

  • check .h and .cpp files, and see if they are consistent.
  • focus on the parameters passed from java side. Check if the parameter type and number of those parameters are the same.
  • Check the function name in .h/.cpp files. It should be like this:

Java_packageName_className_functionName()




2012年5月10日 星期四

building cross platform apps - environment and SDKs

A web server:
XAMPP - http://www.apachefriends.org/zh_tw/xampp.html

Sencha touch 2 framework:
http://www.sencha.com/products/touch/

IDE for html/javascript/...etc
http://www.aptana.com/



Download those files, then you can begin to write the cross-platform apps using javascript and html5.

cheers

2012年5月8日 星期二

XAMPP -- see only "it works"

When that happens, please check if IIS is also installed.
If you didnt install IIS, please kill all the httpd.exe from windows task manager.
Then, it should work.

At least, it worked on my PC. :)