Linker Errors while compiling Release Build - Second try

Hello Folks:
This is driving me nuts.
I have a MFC dll project that links to some static libs.
When I tried to compile my dll, I get following linker warnings:

mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfc42d.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfco42d.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfcd42d.lib"
conflicts with use of other libs; use /NODEFAULTLIB:library
mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfcs42d.lib"
conflicts with use of other libs; use /NODEFAULTLIB:librar




From the warning I could guess that I am somehow using /linking to
debug version of the mfc dlls. I check and rechecked and rebuild but
no luck.

Here are my Linker settings:
Object/Library modules
mfcs42.lib msvcrt.lib rpcrt4.lib MyLib.lib 

and under Ignore libs I used:
msvcrt.lib mfcs42.lib


I put following libs under ignore libs:

msvcrtd.lib,mfc42d.lib,mfcs42d.lib,mfco42d.lib,mfcd42d.lib

But I got following linker errors when compiling


MyLib.lib(CDBRs.obj) : error LNK2001: unresolved external symbol "int
__stdcall AfxAssertFailedLine(char const *,int)"
(?AfxAssertFailedLine@@YGHPBDH@Z)
MyLib.lib(CDBBaseRecordset.obj) : error LNK2001: unresolved external
symbol "public: void __thiscall CRecordset::MoveNext(void)"
(?MoveNext@CRecordset@@QAEXXZ)




thanks
0
4/21/2004 4:19:54 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
919 Views

Similar Articles

[PageSpeed] 26

>I have a MFC dll project that links to some static libs.
>When I tried to compile my dll, I get following linker warnings:
>
>mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfc42d.lib"
>conflicts with use of other libs; use /NODEFAULTLIB:library
>
>From the warning I could guess that I am somehow using /linking to
>debug version of the mfc dlls. I check and rechecked and rebuild but
>no luck.

What option is your static library built to? Your main project and
static libraries need to be built to the same debug/release options.

You shouldn't really need all that messing about with ignore libraries
options, that's usually a sign that something's wrong.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl7375 (2060)
4/21/2004 4:44:53 PM
David Lowndes <davidl@example.invalid> wrote in message news:<q29d80tmmdi4rephd51t59tq02211pgqdv@4ax.com>...
> >I have a MFC dll project that links to some static libs.
> >When I tried to compile my dll, I get following linker warnings:
> >
> >mfcs42.lib(nolib.obj) : warning LNK4098: defaultlib "mfc42d.lib"
> >conflicts with use of other libs; use /NODEFAULTLIB:library
> >
> >From the warning I could guess that I am somehow using /linking to
> >debug version of the mfc dlls. I check and rechecked and rebuild but
> >no luck.
> 
> What option is your static library built to? Your main project and
> static libraries need to be built to the same debug/release options.
> 
> You shouldn't really need all that messing about with ignore libraries
> options, that's usually a sign that something's wrong.
> 
> Dave



I have done some more work and as you suggested I removed the ignore
libs ...
and I am down to following errors now:


msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall
std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined
in libcpmt.lib(xlock.obj)

Any thoughts ?
0
4/22/2004 12:18:19 PM
>I have done some more work and as you suggested I removed the ignore
>libs ...
>and I am down to following errors now:
>
>
>msvcprt.lib(MSVCP60.dll) : error LNK2005: "public: __thiscall
>std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined
>in libcpmt.lib(xlock.obj)
>
>Any thoughts ?

Ensure you're building your application and static libraries with the
exact same compiler threading options, you appear to have a mix of
static and dynamic multi-threaded libraries getting pulled in.

Dave
-- 
MVP VC++ FAQ: http://www.mvps.org/vcfaq
0
davidl7375 (2060)
4/22/2004 9:17:00 PM
Reply:

Similar Artilces:

Unexpected WSE 2.0 errors in Event Log
Hello, We run a very stable and well functioning ASP.Net 1.1 webservice using WSE 2.0 sp 3. Every now and then the following error appears in the system event log: HTTP/ASMX Message Receive Failure: System.Xml.XmlException: This is an unexpected token. The expected token is 'EndElement'. Line 1, position 4387. at System.Xml.XmlTextReader.Read() at Microsoft.Web.Services2.Xml.XmlSkipDTDReader.Read() at System.Xml.XmlLoader.LoadCurrentNode() at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, ...

Error 1722 when opening outlook
When opening outlook i get a "error 1722 there is a problem with this windows installer package..." It started as a office 2000 problem, I upgraded to XP, and loaded all the service packs still didnt work Unistalled deleted the office folder and reinstalled still have the same issue. The user account has power user priv. If i change it to admin it works fine... Any suggestions? ...

Syntax error and Script Error
Dear All, I am getting error whenver i open CRM on each page (Done, but with error on page). when i click on the yehllow icon: following message are listed. http://crmserver/_root/bar_top.aspx?...... http://crmserver/_root/left.aspx?...... http://crmserver/CS/home_cases.aspx?.... http://crmserver/_root/navbarpage.aspx?........ any help or advice will be much appriciated. Regards, Syed. I think there may be some problem with your JavaScript code written for the entities. ...

Error after new installation
We have just installed CRM on a new server and are having issues that we never had on our old server. Many pages display fine but most give a ************************************ Server Error in '/' Application The request failed with HTTP status 404: Not Found. Description: An unhandled exception occurred during the execution of the current web request. Exception Details: System.Net.WebException: The request failed with HTTP status 404: Not Found. ************************************ I think basically it comes down to the CRMService.asmx not working. However the MetaDataServic...

Compile Error: Expected:(
I have a macro that works fine in my workbook, yet when I go into VBA and try to run it there (using F5 or stepping into it with F8 I get the error. All of the other macros in theis workbook work fine from VBA. Any ideas? Here is the macro: Sub Line() ' ' Line Macro ' ActiveSheet.Unprotect Password:="" If Intersect(ActiveCell, Range("range1")) Is Nothing Then Range("RANGE1.1").Select Do If IsEmpty(ActiveCell) = True Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpt...

Tracking Outlook Appointment in CRM
User selected the Appointment, Track in CRM, selected the Contact to relate and Save and Close, then would get the following error: An error occurred promoting this item to Microsoft RM. The Microsoft CRM server could not be contacted or the user has insufficient permissions to perform this action. This item has been saved to Microsoft Outlook but is not being tracked in Microsoft CRM. After many times back and forth with support, the problem turned out to be that the Role the User was assigned to had been a NEW Role that we created and somehow it became corrupt. We determined that s...

Error "Another program is trying to access Outlook" when using CRM
Hello! When using Microsoft CRM 1.2 integrated with Outlook 2002, many of my users are continuously receiving a message stating "Another program is trying to access Outlook. Do you want to allow this?" They are then prompted to allow access to Outlook for up to 10 minutes. If they say yes, 10 minutes later they receive the message again. I believe this may be a Security issue with Outlook but I do not know how to allow the CRM to access Outlook so that we are not seeing this message over and over. Can someone help? Thank you! ...

Error sending mail if MX record is "." example is hotmil.com
I have a strange problem. Running Win2k3 domain and all win2k3 servers. I have an email that is trying to be sent to user@hotmil.com. (yes that is misspelled). My IIS6 SMTP server tries to deliver this to my Domain Controller for some reason. (they are on different servers.) I don't have SMTP server on the Domain Controller. The MX record for "hotmil.com" is set to "." (meaning "root" I believe) with a Preference of 0. First off, this domain's MX record is probably incorrect. However, why would IIS6 SMTP and thus the underlying MS DNS resolve this bac...

problem trying to make a "FitAll" function to a ScrollView
Hi, I'm developing an application where the user is applying filters to an image. I have to display on the left side the original image and on the right side, the modified image. I have an MDI application with a ScrollView derived view. The image are draw in the view like that : BBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF BBBOOOOOOOOOOOBBBFFFFFFFFFFF where B is a border (set to 5 ) OOO : original image FFF : filtered image As membe...

How Stop Rounding Errors?
On financial worksheets I am getting fractional rounding errors. How can you format a cell so that if =(A1*B1) is the formula the result in the cell will be a value such as $50.45 and not $50.457 even though it is formatted for 2 decimal places. A B B 50.457 =ROUND(A1,2) 50.46 (Note the 6) 50.457 =ROUNDDOWN(A2,2) 50.45 50.457 =FLOOR(A3,0.01) 50.45 50.457 =INT(A4*100)/100 50.45 -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP...

Statement Error
I have been using the EMS Data Import program for SQL to import the data from my existing database to our new RMS HQ database. I have successfully imported the customer data, including their account balances. I'm getting an error message when I try to generate statements which is: A10: has a balance discrepancy. Accounts Receivable indicates a balance of €0.00. The last closing balance indicates a balance of €1,457.45 as of 15/09/2007 Can somebody please advise me as to how I can fix this? Regards, Brian McCarthy Brian, This error occurs when you close the customer billin...

Error: 0X51F, SP3, Office 2003, XP
I do not have disk, Office 2003 came with my computer when I bought it. Running XP. Office 2003 SP3 will download but not install. Previous SP1 and SP2 installed OK. Numerous attempts to install SP3 have failed. Why can't Microsoft adjust download-updates to install properly? Need detailed instructions in simple language in simple steps to get this to install. Thanks in advance for any possible help. -- Norske Tip: See if you can download the "fullfile" version of the update(s) via http://www.microsoft.com/downloads/ or http://catalog.update.microsoft.com/ an...

Aggregate error on UPDATE
I have the UPDATE command below that parses OK but when I execute it I get "An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference." I am trying to update a date in a table using results of 3 joined tables and limiting it to only those with MAX date < 2010. Can anyone tell me how to correct this TSQL? Thanks. UPDATE dbo.Branches SET ServiceEndDate = MAX(P.PeriodEnding) FROM dbo.PayChecks P INNER JOIN dbo.PeopleLink L ON P.PeopleLinkID = ...

New Errors on Exchange 2003 SP2 Server
I am getting the following messages in Event Viewer... This is obviously affecting the mail flow to our company. It all started yesterday so perhaps it started as early as this weekend or last week without us noticing. Can someone recommend a fix? I have reinstalled Norton AV using latest EXE and DAT and that did not fix it. Anything else? Event ID 2273 Worker process could not access metabase due to disconnection error. Marking process as unhealthy. Event ID 1000 Faulting application W3WP.exe, version 6.0.3790.3959, faulting module davex.dll, version 6.5.7651.61, fault address 0x...

annoying error...
I am setting up a Terminal Server and any time someone logs in for the first time and executes Outlook I get an annoying error. It says: "Outlook experienced a serious error the last time the add-in 'pdfmoutlook' was opened. Would you like to disable this add-in? ..." When I hit "no" and just cancel out of the profile creation then execute Outlook again the error doesn't happen. However, when I logout then log back in and execute Outlook the error is back. This is a problem because everyone that logs into my terminal server will experience it as well. ...

Error Code 8004888d
Windows Vista Home Premium 32 bit Have been sing windows live messenger for years with no problem. Suddenly it (almost) freezes when I try to log on and then wont let me sign in. "Signing in to windows Live Messenger failed becasue the dervice is temporarily unavailable. Please try again later - Error code: 8004888d" The service is available because I still have no problem signing in at any other computer. I saw some (old) "fixes" on google, all of which I tried and none work. Needless to mention, no help from Microsoft. Anyone any ideas ? Thanks...

Reset Order to run transfer Order to Invoice due to error.
Great Plains v 7.0 Client Transfered an Order to Invoice. I think they tried to print the order the same time the transfer process was running. I noticed that the TIMESPRT was = 3. The error she received was "An open operation on table 'SOP_Log_TEMP' has an incorrect record length. Anyway, the order did not transfer into an invoice. The order is also not available to attempt the transfer process again. The original Order is in the historical tables. How can I reset the order so I can run the transfer process again? Thanks. Kevin Well... I experimented and I seemed to h...

Updates are temporarily unavailable. Please try again later.
I had this problem last year after install money 06 premium. Talked with Help desk for days and no help. So I stopped using sync since most of my credit card that sync with card service are working, checking I do not use often. AFter two months, it back to normal on updates. Now this happens again, when I updates, it always show Updates are temporarily unavailable. Please try again later. I am tired of this..... Anyone who how to solve it? ...

Modify error message of a logon trigger
I would like to alter/modify the error message raised by a logon trigger. It says a default message: "Logon failed for login 'test' due to trigger execution". It would be better an anonymous "Access denied" or something like that. Binging around I found out cannot use RAISERROR or something like that ... so ...can I modify it ?Perhaps in system tables ? Thanks for help. ...

MSN Money Synchronization errors
I am constantly getting "updates are temporarily unavailable Please try again later" every time an manual /auto update is run. I am logged into my passport account and Money is not complaining about anything being out of synch. What exactly is causing this message and what can be done to fix it short of recreating a .mny file from scratch or a new passport account? ...

GL Reconcile Error Message...How to fix this?
We are getting the following error message when attempting to perform GL reconcile (Tools >> Utilities >> Financial >> Reconcile) starting from our historical year 2002: ERROR MESSAGE --> "Historical transactions should be transferred to an open year. After closing the oldest open year, reconcile financial information to transfer transactions to the correct year" Has anyone ever seen the above error message? If so, how do we resolve it? We checked our fiscal periods setup and everything appears to be fine. Checked Knowledge Base but could not find any art...

Error after rollup update 1 in fiscal settings
After the rollup on a dutch language test system the fiscal setting give error: >MSCRM Application Error Report: -------------------------------------------------------------------------------------------------------- Error: Exception of type System.Web.HttpUnhandledException was thrown. Error Message: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Error Details: Exception of type System.Web.HttpUnhandledException was thrown. Source File: Not availab...

error #2
I'm just starting out. When I go to open a template I get the error message "Publisher cannot complete the operation." Any help is appreciated. Anne Baker A trial? There is a wealth of information here for that error if you are using Windows XP. http://www.css-networks.com/2008/08/publisher-cannot-complete-the-operation-on-windows-xp.html -- Mary Sauer http://msauer.mvps.org/ "Anne Baker" <Anne Baker@discussions.microsoft.com> wrote in message news:4DF44333-A8F4-4B6A-919D-4DE36ED4DCF8@microsoft.com... > I'm just starting out. When I...

Visual Basic Runtime Error when closing Excel
Sometimes (not always) when I exit Excel after a long workday I get a Visual Basic Run-time error 5 "invalid procedure call or argument". Can I get rid of this error by uninstalling/reinstalling Excel or is there something serious going on? I am using Excel from an Office 2000 package and I seem to not have any other troubles. We work on a Win 2000 Small business server environment. Any help here would be greatly appreciated. Thank You Sounds like a normal Excel glitch of the sort we all know and love. Poor Excel does seem to get tired after a time and plays up a bit to relie...

Running Calculations to build chart
I have the following columns: Job Title, Week, Total People The data looks like this: Job Title Week Total People PM W2 1 Tech Edit W3 5 Net Engineer W2 2 Programmer W12 10 Programmer2 W1 5 ..... I have a named range of weeks, W1, W2, W3, W4, W5, W6, W6, W8, W8, W10, W11, W12, named "weeks". I'm trying to build a chart to show the total number of people for each week. So I need to total up all the W1s, W2s, etc. to display my chart. Hi - I am using Excel 200. Select your Data > Job Title ...