Link functions with same name in different libraries
Posted Date Unknown Borja Prado 2 Comments


Hello, I have a dynamic library which redefine a system function. The problem is that when I call that function sometimes I link to the system function, sometimes with the dynamic library.

Is there any way to indicate which one in compile time? With any option of gcc / g+ + or putting some directive in the code?

Thanks, Borja.

See All Responses Below...
Author
Message Rating
Posted on: 11/05/2012
If I understood your question properly, you need to call a function which is redefined a system function in the DLL, you can use the scope ( :: )resolution operator in C++, in order to distinguish between global function and your own function inside a class.

Another way is to use the #ifdef pre-processor directive which conditionally compiles your method...

Not sure about your exact requirements..

can you illustrate your problem with an example..

Tom


Posted on: 11/05/2012
Thank you very much, this helps me.
Share this page across other social networking sites



Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
   Design  HTML
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site. 

TekTipsDownload
GateExam
Academic Projects
TekTipsExperts



 
Site optimized for IE7, 1280 X 768 and above. Copyright © 2010 - 2018 KTS InfoTech
Site Developed Using KTS WebCloud