Solved

Version Editor in Developer Studio 5 -> Compilation Date

Posted on 1997-08-12
14
264 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
Comment Utility
It appears that your .RC file isn't being preprocessed before being resource compiled.
0
 

Author Comment

by:gilg
Comment Utility
How can I make it be preprocessed????

0
 
LVL 10

Expert Comment

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


0
 

Author Comment

by:gilg
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Adjusted points to 85
0
Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

 
LVL 25

Expert Comment

by:dew_associates
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Let me know how you make out!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now