Solved

Version Editor in Developer Studio 5 -> Compilation Date

Posted on 1997-08-12
14
272 Views
Last Modified: 2013-12-29
Developer Studio 5's help claims: "Version information consists of company and product identification, a product release number, and copyright and trademark notification.". I want to have compilation date as well.
In MSVC 1.52 I could simply have a row like this in a BLOCK:
VALUE "Compilation Date", __DATE__ ", " __TIME__ "\0"

When I use the same .rc in a Developer Studio project I get:
error RC2104 : undefined keyword or key name: __DATE__

Please advise.
0
Comment
Question by:gilg
14 Comments
 
LVL 1

Expert Comment

by:dabbler
ID: 1693056
It appears that your .RC file isn't being preprocessed before being resource compiled.
0
 

Author Comment

by:gilg
ID: 1693057
How can I make it be preprocessed????

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1693058
Are you getting this information when opening the resource for editing? or when compiling resources? or ...?


0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Author Comment

by:gilg
ID: 1693059
I get the problem when trying to compile a .rc created via VC++ 1.52. If I open it in Developer Studio 5, it gets corrupted, but if I edit it from anywhere else and comments out the problematic row I can use it asis in the Studio.
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 1693060
Gilg: The problem in Developer Studio is that the keyword "Date" is an undefined keyword or key name, eg:
      MFT_STRING

You need to first define the keyword before you can use it!
0
 

Author Comment

by:gilg
ID: 1693061
Sorry, didn't quite grasp that. How do I define the __DATE__ keyword so that the resource compiler (or some sort of preprocessor) will know he should replace it by compilation date?
0
 

Author Comment

by:gilg
ID: 1693062
Adjusted points to 85
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 1693063
Gilg: The variables are usually created in Visual C or J and then Developers Studio is used to run the project.
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 1693064
In essence, decompile the project item your trying to change, whether in J or C, create the additional variable, recompile it and run it in developers studio as before.
0
 

Author Comment

by:gilg
ID: 1693065
I'm still not with you, I'm not trying to change any project item. I have a resource file (.rc) created and succesfuly compiled under VC++ 1.52 and I am trying to add it as is (the source) to a Developer Studio 5 project. The __DATE__ symbol was in VC++ 1.52 a predefined symbol substituted to the current compilation date and it is so also in the Studio (I can look it up in the Help and what more, I can use it in a .cpp file. It seems more likely that my .rc isn't being preprocessed and I want to know how to make it be.
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 1693066
Gilg: Your trying to take a shortcut. Your words: "I get the problem when trying to compile a .rc created via VC++ 1.52. If I open it in Developer Studio 5, it gets corrupted, but if I edit it from anywhere else and comments out the problematic row I can use it asis in the Studio. "  and " The __DATE__ symbol was in VC++ 1.52 a predefined symbol substituted to the current compilation date and it is so also in the Studio (I can look it up in the Help and what more, I can use it in a .cpp file." Okay, from a developers standpoint, which is it, a file that becomes corrupted in Developers Studio or one that works. If it's being correupted, then there's either something wrong with the file or with the install of Developers Studio! If you are getting, "error RC2104 : undefined keyword or key name: __DATE__" and you know that the keyword has been defined, then the file itself is corrupted. Therefore, we are back to the original answer, uncompile the file or replace it with a known good one that has the keyword present.
0
 

Author Comment

by:gilg
ID: 1693067
Well, I'm quite new to the studio (and to PC programming). How can I uncompile a .rc? The Studio doesn't let me textually edit the Version info, I get a list of keys and values and I can update the values but I can't add a new pair. What I need to do, and it doesn't seem much to me, is add compilation date to the version info.
Now, maybe this is a new question and I would very much like to grade you for your efforts so far. If you'll just tell me how it's done.
0
 
LVL 25

Accepted Solution

by:
dew_associates earned 80 total points
ID: 1693068
Gilg: Microsoft (I believe) makes available a developers kit for Visual C++ and for Visual J. If I were you, and given that what you want has been compiled in C++, download the kit for visual C++ and decompile the resource file. Make the additions for what you need and then recompile it. You should then be able to run the studio as you need too!  Make sure though that you have a good copy of the file you want to decompile and change. I say this only because of the errors you have received.
Both "C" and :J" are available on Microsoft's site.
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 1693069
Let me know how you make out!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question