Wednesday, January 20, 2010

Upgrading VCL Apps to C++ Builder 2010

If you run into the following error, here's what you need to do.

[ILINK32 Error] Error: Unresolved external 'wWinMain' referenced from C:\PROGRAM FILES\EMBARCADERO\RAD STUDIO\7.0\LIB\C0W32W.OBJ

Open your main cpp file and look for this line,

WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)

Change it to,

WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR,
int)

This is to do with the Unicode support in the new IDE (starting from CB2009).

3 comments:

Tom said...

Thanks for the hint. This helped me find the error and save my day!!

Anonymous said...

Saved my day. Thanks

App Builder said...

I really enjoyed your article, It’s a wonderful tutorial. I am waiting for your next post.Thanks for sharing!!