Linker problem?

I have a MFC solution built in Studio.NET 2003. There are 2
projects(DLL), I can build one of it. For anotherone, it said link
problem: can not link to the first. Which part I missed?

0
yqin_99 (193)
2/7/2006 9:35:15 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
471 Views

Similar Articles

[PageSpeed] 7

Let say, I have built the first project and got first.dll and
first.lib.

Then I copy the first.lib to the second project and in second project
setting->linker->input, add first.lib.

But I still got link error said can not resolve external symbol which
is defined in the first project.

What I missed?

0
yqin_99 (193)
2/7/2006 9:39:03 PM
btw, don't keep copying around lib files. Use project dependencies.
Are you sure you have exported the functions from the dll?

dumpbin /exports yourdllname.dll
The above will give the exports from the dll.

-- 
Vipin Aravind

"kathy" <yqin_99@yahoo.com> wrote in message 
news:1139348343.468588.159700@g14g2000cwa.googlegroups.com...
> Let say, I have built the first project and got first.dll and
> first.lib.
>
> Then I copy the first.lib to the second project and in second project
> setting->linker->input, add first.lib.
>
> But I still got link error said can not resolve external symbol which
> is defined in the first project.
>
> What I missed?
> 


0
vipin (697)
2/8/2006 4:22:25 AM
It seems that you may not be exporting the functions from the first.dll. Is 
this an extension dll, regular dll? Check also for name mangling.

"kathy" <yqin_99@yahoo.com> wrote in message 
news:1139348343.468588.159700@g14g2000cwa.googlegroups.com...
> Let say, I have built the first project and got first.dll and
> first.lib.
>
> Then I copy the first.lib to the second project and in second project
> setting->linker->input, add first.lib.
>
> But I still got link error said can not resolve external symbol which
> is defined in the first project.
>
> What I missed?
> 


0
drpazz (112)
2/8/2006 5:45:19 AM
Several problems:

First, as already pointed out, you should not "copy the first lib file to the second
project".  This is a very, very strange thing to do.  There are several correct solutions,
such as targeting the output to a LIB directory which is part of your project (the best
solution), targeting the output of the link to the project (better than doing a copy, at
least), or redirecting the link to pick up the .lib file from the appropriate project.

Second, you have given a rather vague description of the problem, and no examples of the
source, so it is impossible to figure out what happened or why some particular symbol
would be undefined.  If you have a problem where the linker reports that a paticular
symbol is undefined, it is usually helpful if you can show the function definition (minus
its body, which is not important), and give the actual linker error message.  You could be
a victim of C++ name mangling, failure to export the symbol, failure to find the correct
library, etc., but with such a vague problem report, it is impossible to guess what is
going on.
				joe

On 7 Feb 2006 13:39:03 -0800, "kathy" <yqin_99@yahoo.com> wrote:

>Let say, I have built the first project and got first.dll and
>first.lib.
>
>Then I copy the first.lib to the second project and in second project
>setting->linker->input, add first.lib.
>
>But I still got link error said can not resolve external symbol which
>is defined in the first project.
>
>What I missed?
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
2/13/2006 5:16:11 AM
Reply:

Similar Artilces:

Count function problem
I have a formula in a cell which reads: "=IF(COUNT(D13:G13)>=2,J13+MAX(H13,$B$43),0)" When I created this workbook template, the cells from D13 to G13 were blank until I filled them in, and this formula worked fine. However, I've made a change to the workbook. Now I've made D13 through G13 equal to the values in a range of cells from other sheets in the workbook (for e.g. D13 is "=Sheet1!D13". The above formula is now generating the number from B43 by default, even though the cells from D13 to G13 are blank. The "COUNT" help in Excel says: "...

email problems
I am getting the following error message when I try to acces my email. Please advise. Thank you. An unknown error has occurred. Account: 'mail.bellsouth.net', Server: 'pop.att.yahoo.com', Protocol: POP3, Port: 995, Secure(SSL): Yes, Error Number: 0x80004005 In your browser go to http://mail.yahoo.com and log in to that account. Then clean out all the folders in your webmail. If you want to save any messages, create a new folder and move those messages to the new folder. Empty the spam and thrash folders also. Close webmail, then try Windows Mail again. Gary ...

A problem difficulty for me but easy for you!
the problem is the fllowing: 1.Either a database or a table of it has so many records that it is wasting time if we try to operate it in total any time . 2.I want to show some records page by page in the web page.At the same time,maybe I have to sometimes list them order by some fields . 3.To do what 2 shows as quickly as possible,because users don't wait with patience.how can I do? thanks "jifenghu" <jifenghu@mail.ustc.edu.cn> wrote in message news:e0TlxiY5EHA.1760@TK2MSFTNGP10.phx.gbl... > the problem is the fllowing: > 1.Either a database or a table of it has s...

Problem with starting Word 2007
I have a recurring problem with Word 2007. Every few days (I haven't figured out a pattern yet) Word 2007 will not start. All that shows up is the Word 2007 splash screen. In order to get past this I have to remove the normal.dotm file and reboot. Then I can bring up Word 2007. This problem started a few weeks ago and I have not installed anything new on the computer. I'm runnin Windows7 and MSOffice 2007. I've removed a few add-ons in order to pinpoint the issue but so far no luck. Questions: Has anyone seen this problem before? Does anyone have suggestions of wha...

Alternate recipient problem
We have a user with an Exchange mailbox that has an Alternate recipient set with copy retaining by mailbox. Problem is this - we are intermittantly getting emails that hit the exchange mailbox that DO NOT get forwarded on to the Alternate recipient. We know this is the case as we have checked the Alternate recipient's log as well as our outgoing SMTP server's log. Has anyone else experienced this or know of a fix? Exchange 5.5 sp3 running on NT4 Server. ...

Linker Errors
Hi Guys, After I changed my WINVER, _WIN32_WINNT, and _WIN32_WINDOWS all to 0x501, in order to get access to PrintWindow, I get a bunch of linker errors that have stummped me. It says it can't find _xGetMonitorInfo, _xMonitorFromWindow, and _xGetSystemMetrics. I suspect that I have to update my SDK, here is the question, if I'm using VS2003, can I update my SDK to get rid of this problem? AliR. AliR wrote: > Hi Guys, > > After I changed my WINVER, _WIN32_WINNT, and _WIN32_WINDOWS all to 0x501, in > order to get access to PrintWindow, I get a...

Offline Problem
We have the Offline database set up and when we test the database connection it is good. After setting it up, we did a clerk reading and the offline database synchronized with the master database OK. But when the server goes down, the offline register syas data connection lost. It's not autometically switching over to the offline database. We get the following error: 2147467259 Native error 11 Select Get Date() as CurrentDateTime Any help would be appreciated. It doesn't automatically switch. It will give you that error when the DB goes down, and then you need to launch the ...

division problems
I am trying to keep track of softball stats, I trying to compute batting average. I have at bats in column b, hits in column c. I am trying to get the averages in column d, but I can not get the formula right, I keep getting error messages. The result is less than 1 Hi you have received several anwers to your original thread. Have you tried these formulas? -- Regards Frank Kabel Frankfurt, Germany "cflan" <cflan@discussions.microsoft.com> schrieb im Newsbeitrag news:85E9489B-79FE-4571-833A-95614E35C801@microsoft.com... > I am trying to keep track of softball stats, I ...

Label Problem
I am trying to print a barcode over 6 characters using Zebra LP2844 and 17757 Lablel( 2.2*.5) I can only print upto 3 digits on the label before it starts to print outside the label.I would apprecite if someone has a label desinged or some tell me how to reduce the font on the barcode. Using windows drivers. -- Thank You Ram, Go to Store Operation Manager>>Utilities>>Label Designer>> Open your existing label in the window & select Barcode set TOP,LEFT,HEIGHT,WIDTH as per your requirement.Make sure to save changes of label again. -- With Regards Junaid Idrees A...

Outlook 2007 save to network problem.
Hello, First, sorry about my bad english. So here is the problem, and some background info. OS: Windows Vista 32-bit with SP2 Office: Office 2007 SBE with SP2 (includes Outlook) Server: Small Business Server 2003 Premium Problem: When receiving email to Outlook with attachment (example, pdf, jpg, about 4Mb and larger), cannot save it to the network location (mapped drive). It is possible to save local disk (example C:\Test - folder). When tried to save to network location, Outlook starts to saving attachment, but takes about 30 second, and then comes pop up info "...

Budget Problems due to Category Problem
I'm having a problem in not being able to switch from essential budget to advanced budget. I tried removing all budgeted items from the income and expense areas from the essential budget. However, there are 3 categories that I think are corrupt and I'm not able to remove them. I've checked the 3 categories and each one has a sub-category and the sub-categories have a sub-sub category. For example, Insurance is the category, health is the sub-category and a sub-category to health is prescriptions. When I try to delete the category or the sub-category or the sub-sub categ...

Publisher problem #2
I have a user that has problems working with graphics in publisher. She gets a message stating that the program is not communicating with the OLE terminal server. She also complains that the computer is operating at "half the speed" it normally does when using publisher. Does anyone have any suggestions what might be causing this error? I have searched the knowledge base and had no luck Please advise. Don't use copy-and-paste or paste-special. Most of the time you don't need this and it WILL slow down things quite a bit. "Gmgoodnight@yahoo.com" <anonymou...

ON_UPDATE_COMMAND_UI and CCmdUI::SetText() problem
Hi, I have a handler for ON_UPDATE_COMMAND_UI which calls CCmdUI::SetText() for one of the menu items in the File menu (drop down from the main menu bar). The handler gets called when the menu drops down, as expected, and the SetText() function executes. However, the text of the menu does not change! I tried inserting a call to CCmdUI::Enable() for testing purposes, and that seems to work fine--only SetText() fails. I have handlers in the same class that get called for popup menus activated by right-clicking certain objects, and calls to SetText() within those handlers work fine. Any ideas w...

Problem with Vlookup
Maybe there is a restriction on the number of cells I can search I don't know.. =VLOOKUP(A53078,$G$2:$H$84,1,FALSE) returns a result of #N/A when I copy that same formula to an entry for like the first 1000 entries it returns a result, but beyond it seems to not be working.. Is there a limit?? Is there a problem with my formula? The lookup Table lives from G2:H84 and its sorted AtoZ I want to return the result to this particular cell from column one in my table.. It should be checking Value in A53078 against my table.. ideas? On Nov 16, 10:55=A0am, srosetti <thro...

Linker problem?
I have a MFC solution built in Studio.NET 2003. There are 2 projects(DLL), I can build one of it. For anotherone, it said link problem: can not link to the first. Which part I missed? Let say, I have built the first project and got first.dll and first.lib. Then I copy the first.lib to the second project and in second project setting->linker->input, add first.lib. But I still got link error said can not resolve external symbol which is defined in the first project. What I missed? btw, don't keep copying around lib files. Use project dependencies. Are you sure you have exported ...

Data Validation problem #4
OK firstly, I tried to use the VBA code on this pag http://tinyurl.com/6rlrp to attempt to remove the blank cells from list but it didn't work (although it doesn't mention how you'r supposed to set the validation up). Anyhow that was just one solution to the problem, there may well b more. I have a workbook with two columns of data. In the first employe names, in the second their job title. On another workbook there is a dropdown box for job title, that's nic and simple (well only because I've separately typed in a list o available titles. The problem is that I then ...

2 little problems
Hello, i must teach some lessons of excel and i get some questions that i don't know the answer, so maybe you can help me. 1) When you select a row or a kolom and want to change the height or width, with me the standard value's are 12,75 and 8,43 but i don't know what it is. Is it milimeters, centimeters (but that's not possible), pixels, ... 2) When you enter 3 numerical value's, leave then one row open and then you put there a function to count them up, it works just fine. But when you enter a fourth numerical value it automatic recalculated and takes the fouth value wi...

Outlook 02 Contacts list problem
Hi All! I've got a really big problem with the office Contacts email list. We use Outlook 2002. The problem is that we have all our email addresses listed in the Contacts folder. When we open a blank email and type a name into the To: field (or any other field) it should a) automatically complete the email and b) when the To button is clicked show the list of contacts in some kind of order. Although we have just over a thousand email addresses the searching for an address after autocomplete is very slow. Additionally, although when I look at the list of emails in Contacts they are pe...

ApplyFilter problem
Hello All I have a form with a button with the following OnClick event: DoCmd.ApplyFilter ("qry eoys to do") The sql of "qry eoys to do" is: SELECT practices.[prac name], practices.[20056 EOY], Left([prac name],1) AS initial FROM practices WHERE (((practices.[20056 EOY])="6") AND ((Left([prac name],1))<"c")); When I click the button to apply the filter I get a message that the field [prac name] could refer to more than one table listed in the FROM clause of the sql statement ... which I really don't get at all!! Hope someone can...

Permission Problems
I have a problem with permissions. According to Microsoft's Knowledgebase article 313333, I have edited permissions from the Exchange installable file system and should not have. Now we don't have permissions to change permissions through the regular MAPI interface The article gives a solution, but I can't seem to find the utility that it talks about anywhere on Microsoft's website. Anyone have a copy of pfinfo.exe and pfadmin.exe? Also, has anybody run into this before and solved it Thanks in advance JohnC Hello and Thank you for your post. These utilities should be ...

Problems with CAsyncSocket.
I am having problems using CAsyncSocket or maybe I don't understand something. I establish a TCP client connection and my problem occurs when I receive large sized packets of about 8200 bytes. I have an OnReceive virtual function which gets called. Within this function I call "Receive" providing a large buffer. If I receive a small length packet, everything works great. But... On my slow laptop, if I am receiving a large packet, when I perform the "Receive", I will get exactly the entire packet. Occasionally on my laptop and usually always on an different PC (fa...

Pasting problem
Hi, I am new to excel and i am trying to paste some data from a table this table is in sheet 1 of my workbook. What i am not able to do is whenever i paste the data in required cell in sheet 2 it gives back formulas to me instead of the actual figures that i can see over here. Any clue why is it happenning. Hi, When you copy the cells in sheet1 and paste it in a cell of sheet2 before pasting right click on that cell >>paste special>>check the radio button of values>>ok. By doing this you'll paste the value instead of the formula. -- _______________________ Click...

how to fix this problem???
The user does not accept email in non-Western (non-Latin) character sets. Sorry Info Win XP Pro O/L SP3 Appreciate any help on this. "Keefer" <dk.weiss@verizon.net> wrote in message news:vZ_Xe.16861$Yu2.7054@trnddc02... > The user does not accept email in non-Western (non-Latin) character sets. > > Try Google Groups. http://groups.google.com/groups?as_q=The+user+does+not+accept+email+in+non-Western+(non-Latin)+character+sets.&num=100&scoring=r&hl=en&as_epq=&as_oq=&as_eq=samba&as_ugroup=&as_usubject=&as_uauthors=&lr=lang...

resolving external references in linker
What is the order of resolving external references in linker in Visual C++ 6.0 ? I have a class in a library. I include the library in my MFC-project. In that project I have a newer version of the same class. How can I make sure that my source code in that project uses that newer class and not the older one from the library? Use namespaces? "Mikko Kuorisuo" <juppistuuk@online.nospam> wrote in message news:OqUNULfNFHA.4052@TK2MSFTNGP12.phx.gbl... > What is the order of resolving external references in linker in Visual C++ > 6.0 ? > > I have a class in a libr...

Problems adding a shared mailbox
Hi I have Outlook 2000 clients connecting to a Exchange2003 serv/Win2003 member server in our domain. I create a shared mailbox, add the permissions for a group (or myself), add the mailbox via tools -> services etc and then when i try and access the mailbox it appears grey in the message pane saying : ' Unable to display the folder. The information store could not be opened '. This is driving me mad because I cannot see a problem - any ideas anyone? ------- Tech Admin West Midlands, England Stressed and Tired! -------- how did you apply permissions on the mailbox? via Out...