473,657 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 2808
weaknessforcats
9,208 Recognized Expert Moderator Expert
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
4378
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 a function, the function is not public in the library. 1- When I use a class, all is symbols are put in the public section of the library. How can I change that. The keyword "private" in a class is only for the langage or does it change (like...
1
2329
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 a function, the function is not public in the library. 1- When I use a class, all is symbols are put in the public section of the library. How can I change that. The keyword "private" in a class is only for the langage or does it change (like...
3
503
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 the semantics, scoping rules, and so forth. I guess I'm looking for something like cscope, but with replacement functionality. (Even better: is there such a tool that is vim-friendly?) Thanks in advance for any pointers.
3
6057
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 hierarchical view of Parent Nodes and projects where in a projectnode can be added to any ParentNode and hence we may have a project node added to 100 Parent nodes. In this one, I have an operation of Renaming a Project Node. So whenever I am doing the...
5
2730
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 called with an in-use file). However, what happens is that a copy of the file is made, and the old file still exists. For example: C:\>c:\python24\python.exe Python 2.4.2 (#67, Sep 28 2005, 12:41:11) on win32
1
1913
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 window of the debugger, I place my cursor over the breakpoint symbols in the left column, and I get the message: "The Breakpoint will not currently be hit. No Symbols have been loaded for this document."
2
3493
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 rename function fails to do the actual renaming. I tried to rename a file in the same dir using strings instead of variables and that works!! But it seems I need to get it to work with vars as well. Can anyone give me a clue? Thanks!! $dirname =...
7
2831
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 Styles windows would have a simple "rename this style" option that does this, but I can't find it... TIA - Bob
0
4357
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++ solution and the missing symbols occur in one of the DLLs. No, for me there isn't, I searched for B.pdb in my entire code directory and there is no second B.pdb file. However, I found a Binary_debugB.pdb file one level up from the the project...
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.