473,324 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Re: Building a Copyright statement<4936c2ec-cd3c-44fb-a24a-0a685d195c24@k30g2000hse.googlegroups.com><1c35038 e-1be1-4105-a365-9fc89c2c95ae@l42g2000hsc.googlegroups.com>

On 2008-05-26, James Kanze <ja*********@gmail.comwrote:
>
Visible how? If all you're interested in is that it shows up in
the output of strings, then just including a file with:
static char const copyright[] = "..." ;
should do the trick. You're compiler may even have an option
which will force an include at the start of compilation.
Although some compilers with some optimization settings will drop the
variable from the object file if it's not 'used' elsewhere in the
translation unit. (Being static it can't be used from any other TU.)

--
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
Jun 27 '08 #1
1 1233
On May 26, 1:04 pm, Charles Bailey <usenetspa...@hashpling.orgwrote:
On 2008-05-26, James Kanze <james.ka...@gmail.comwrote:
Visible how? If all you're interested in is that it shows up in
the output of strings, then just including a file with:
static char const copyright[] = "..." ;
should do the trick. You're compiler may even have an option
which will force an include at the start of compilation.
Although some compilers with some optimization settings will
drop the variable from the object file if it's not 'used'
elsewhere in the translation unit. (Being static it can't be
used from any other TU.)
The obvious answer to that is: don't use those compilers, or
don't use them with those settings:-).

In fact, of course, it's a bit more awkward, because if the
variable is a POD with static initialization (as it is here),
then such a modification is quite valid; there's no way the
program can tell. If it becomes an issue, some sort of
work-around using dynamic initialization could be used (but
beware---this will impact on start-up times). Another
alternative would be to make the variable non-static, and hack
the name of the file into the name of the variable, to avoid
duplicate definitions. (Either solution can easily be generated
automatically.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results....
3
by: DrSarang | last post by:
While building XmlSampleGenerator code from MSDN, I get missing XmlSchemaSet reference. Here is the screen dump, if needed. C:\Documents and Settings\Dr Sarang\My Documents\MSDN\XML Sample...
3
by: ELCO | last post by:
www.electronic-copyright.com invites anyone interested in protecting their intellectual property copyright (including programming code) to visit our website. We assist you in verifying your...
0
by: Vidyasagara Guntaka | last post by:
Hi, I recently downloaded source code for 8.0.0 beta1. When I tried building the libpq for windows, I got some compilation errors. Following the compilation output:...
7
by: Alan T | last post by:
How do I set the text property of label on a form as above ?
0
by: CptDondo | last post by:
I hope someone can shed some light on this. I am working with an arm9 platform. I've been trying to build php4 with extensions enabled, but I am failing miserably. I was able to build ming as a...
6
by: Jobe | last post by:
Dear All, Pushed the wrong button:) So again... Could you please advise if there is a violation of copyright of web- code. Website made by me:
13
by: treble54 | last post by:
I need to build PHP from source with the pdo_ibm extension and I am having an issue with it. Firstly, I am using Visual Studio .NET 2003 and I am building PHP from source through the Visual Studio...
0
by: Charles | last post by:
I'm a novice with C++ programming so please bear with me: I'm in the process of inserting multiline Copyright statements in some C++ code and I have many modules to update. The Copyright...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.