Solved

Version Editor in Developer Studio 5 -> Compilation Date

Posted on 1997-08-12
14
270 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
 

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
Swamped with email signature updates?

Have you been given a load of changes to make to your users’ email signatures? Having to manually implement multiple signatures for every department? Let Exclaimer save you from being swamped with email signature updates!

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
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…
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…

920 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

16 Experts available now in Live!

Get 1:1 Help Now