Jump to content
alank2

old BCB6 question about wmain

Recommended Posts

I still have some projects in the old bcb6 that I need to compile sometimes.  One thing I noticed is that if I create a new win32 console mode application, it doesn't let me replace main;

 

int main(int argc, char* argv[])

 

With wmain:

 

int wmain(int argc, wchar_t* argv[])

 

In cppb10 there is an option _TCHAR maps to where you can select char or wchar_t and this seems to clue the linker in to look for main or wmain.  Is there an equivalent option for bcb6? (for anyone who remembers this old compiler!)

 

I tried looking in the compiler/linker settings, but I am missing it or it doesn't exist.

 

Share this post


Link to post
4 hours ago, Roger Cigol said:

I would plump for "doesn't exist".

You would be correct.  There is no "TCHAR maps to" option (or equivalent) in BCB6.  Although you can manually define UNICODE to swap TCHAR between char and wchar_t during compiling, that has no effect on the linker or the startup code.

Edited by Remy Lebeau

Share this post


Link to post

Thanks for checking!

 

I found the option -WU mentioned in the help and it works at the command line, but putting it in CFLAG1 in the BPR file did not accomplish anything.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×