?
Solved

Version Editor in Developer Studio 5 -> Compilation Date

Posted on 1997-08-12
14
Medium Priority
?
286 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals is required.

 

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 160 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

770 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