473,385 Members | 1,890 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,385 software developers and data experts.

How to rename all symbols of an entire library make it other library

Hi
I have a little problem,
I have a source code which need to be compiled in two diffrent ways
With some diffrent # defines in both cases.
And I need to link both library to link to the same binary.
Problem is the due to diffrent # defines some functions behave diffrently.
And sorce code need to be compiled in both ways.
So I thought of a solution to change the name of symbols after compilation rename the library and link both library with the binary.
Some help on this issue will be very helpful.
Regards
Swapnil
Jan 9 '10 #1
1 2754
weaknessforcats
9,208 Expert Mod 8TB
You cannot change the names of symbols after compilation. All you have is a binary executable. You can't even tell if it was compiled.

Try this:

Expand|Select|Wrap|Line Numbers
  1. #ifdef  METHOD-A
  2. #define  X 10
  3. #endif
  4. #ifdef METHOD-B
  5. #define X 20
  6. #endif
Just define METHOD-A of METHOD-B at the build level.

Add the libraries the linker input.
Jan 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
1
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
3
by: OvErboRed | last post by:
Is there a program that can help me safely rename a variable, function, constant, macro, etc. in either C or C++? Simple search-and-replace doesn't work, because you need something that understands...
3
by: Saradhi | last post by:
Hi All, Here I am facing a performance problem with the TreeView Node renaming. I am displaying a hierarchy Data in a treeview in my Windows C# Application. My tree view represents an...
5
by: Tony Meyer | last post by:
On Windows, if I do os.rename(old, new) where old is a file that is in-use (e.g. python itself, or a dll that is loaded), I would expect that an error would be raised (e.g. as when os.remove is...
1
by: wylbur via DotNetMonster.com | last post by:
I'm having a problem with establishing breakpoints in DbgCLR Version 2.0. I've set breakpoints for statements in Page_Init, and they were never triggered when I loaded the webpage. In the code...
2
by: tanichka | last post by:
Hello you helpful folk! Please look at my script and tell me what I am doing wrong! I am cleaning the names of my music files from unnecessary symbols, and the cleaning works fine, however the perl...
7
by: Bob Altman | last post by:
Using VS 2008 SP1, is there a way to rename a CSS style and all of the references to that style (short of doing a global find-and-replace in the code)? You'd think that the Manage Styles and Apply...
0
by: John Peterson | last post by:
I'm a little confused by the topics system here. I wanted to respond to this post but it was closed or something. But here is my follow up: Yes, I checked all that. My solution is a C++...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.