Find Jobs
Hire Freelancers

MFC Link Error - Help/Advice - Emergency $$ will bonus $$ for fast help

$100-500 USD

Closed
Posted over 15 years ago

$100-500 USD

Paid on delivery
We have a statically linkable client library that utilizes MFC. We delivered this library to one of our customers. Our customer requires in their application to over load new and delete operators. For example, see below: void* operator new( size_t size ) { /* some alloc code */ } void* operator new[](size_t size) { /* some alloc code */ } void operator delete( void *ptr ) { /* some dealloc code */ } void operator delete[](void* ptr) { /* some dealloc code */ } Because it seems MFC also does this, there seems to be a conflict with the new/delete operators for MFC and the new/delete operators that are defined in the customers application. When the customer builds it yields the following linker errors: [login to view URL](afxmem obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2YAPAXIZ) already defined in [login to view URL] [login to view URL](afxmem o bj) : error LNK2005: "void __cdecl operator delete(void *)" (??3YAXPAXZ) already defined in [login to view URL] [login to view URL](afxmem ob j) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_UYAPAXIZ) already defined in [login to view URL] [login to view URL](afxmem obj ) : error LNK2005: "void __cdecl operator delete[](void *)" (??_VYAXPAXZ) already defined in [login to view URL] We need some advice fast. What can we do to change in our lib code (we cannot remove MFC) to avoid this problem for our customers? We considered building the lib as a dll and telling them to use it that way but it is not ideal. Is there anything we can do with namespaces to avoid this conflict? Fast response will get bonus! ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Visual Studio 2005 C/C++
Project ID: 3114631

About the project

8 proposals
Remote project
Active 16 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
8 freelancers are bidding on average $101 USD for this job
User Avatar
See private message.
$212.50 USD in 1 day
4.9 (95 reviews)
6.4
6.4
User Avatar
See private message.
$85 USD in 1 day
4.8 (19 reviews)
4.7
4.7
User Avatar
See private message.
$85 USD in 1 day
4.8 (11 reviews)
4.7
4.7
User Avatar
See private message.
$85 USD in 1 day
4.9 (28 reviews)
4.0
4.0
User Avatar
See private message.
$85 USD in 1 day
5.0 (2 reviews)
3.6
3.6
User Avatar
See private message.
$85 USD in 1 day
5.0 (2 reviews)
1.0
1.0
User Avatar
See private message.
$85 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$85 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Mission Viejo, United States
5.0
255
Member since May 24, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.