AutoHotkey Community

It is currently May 27th, 2012, 8:32 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: April 9th, 2006, 9:40 pm 
Offline

Joined: April 9th, 2006, 3:50 pm
Posts: 5
For those with the 2002 version of Visual C++, upgrading to the 2003 compiler using the VC++ 2003 Toolkit worked well. This is what I had to do:

1. Install the Visual C++ 2003 Toolkit.
2. In Visual C++ 2002, go to Tools --> Options --> Projects --> VC++ Directories and make the following additions so that they appear at the top:

Add "C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin" for Executable Files.
Add "C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" for Include Files.
Add "C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib" for Library Files.

3. Add the following line to script_gui.cpp:
#define BS_TYPEMASK 0x0000000F

I was then able to compile without errors.

BTW:

I probably would have been fine with just VC++ 2002 (7.0) by itself. The only slight advantage to upgrading to the 2003 (7.1) compiler that I noticed was not having to include the value of ULLONG_MAX.

The VC++ 2003 Toolkit doesn't work with VC++ 2005 (Express Edition), at least in my experimentation. This is what I would expect since there was a huge change from 7.1 (2003) to 8.0 (2005) since 8.0 supports C++/CLI.

The compiled program, by default, wants to live in a directory that doesn't exist (C:\A-Source\AutoHotKey\Test). The default directory is defined in autohotkey.cpp. Of course, an installation program or some source code editing could take care of this.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 10th, 2006, 12:13 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for posting this info. I'm sure it will be useful to others.

MTbot wrote:
The compiled program, by default, wants to live in a directory that doesn't exist (C:\A-Source\AutoHotKey\Test). The default directory is defined in autohotkey.cpp.
That section is in effect only when you compile in Debug mode (#ifdef _DEBUG). It allows you to specify a script of your choice to run in the debugger. I leave it set to the scripts I test frequently because there is no knowing what paths/files might exist on other PCs.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 10th, 2006, 8:45 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
Hi,
well, the migration is not a small task.
To migrate a big application between vc5->vc6 lasts about 3 weeks.
We estimate that the migration from vc6->vc7 will take considerably longer, because microsoft has changed a lot of things.
only one example:
old compiler
Code:
for (int x = 0; x < 30; x++)
{
    if (something reached)
     break;
}
for (x = 0 to 4)
{
 do something.
}

That will not compile with vc7, because x only lives inside the { } of the first for-loop. You have to define x also in the second loop, but than you will never be able to compile it with an old compiler, which exclaims that you have redefined an existing variable.
You have to write
Code:
int x;
for (x = ......
{
}
for (x = .....


And that is only one of many changed things.

I think AHK should stay compatible with the old compiler (not everybody wants to install the new one) therefore the migration must keep that in mind.

Perhaps there are breaking changes, which can't be solved as easy as the example above. Perhaps you have to use
Code:
#ifdev this compiler
to this
#ifdev that compiler
do that


But that's not readable.

But I appreciate your work. If you need help with the migration, you can contact me.

Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group