Solved

Unresolved external  symbol

Posted on 1998-04-16
10
558 Views
Last Modified: 2013-12-03
I get the unresolved external symbol error message when trying to build my program.
 
 unresolved external symbol _Process32Next@8
 unresolved external symbol _Process32First@8
 unresolved external symbol _CreateToolhelp32Snapshot@8

From the code section:-
void Snap()
      {
      HWND hSnap;

      hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

    if (hSnap ==(HANDLE) -1)
      {
            MessageBox();
      }
      else
      {
            PROCESSENTRY32 procEntry;
            procEntry.dwSize = sizeof(PROCESSENTRY32);

            if (!Process32First(hSnap, &procEntry))
            {
                  //this can't possibly happen
                  MessageBox();
                  assert(FALSE);
            }
            else
            {
                  BOOL bResult;
                        do
                  {
                  
                  bResult = Process32Next(hSnap, &procEntry);
                  } while (bResult);
            }
            CloseHandle(hSnap);
      }
      }
0
Comment
Question by:gnik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1412819
You need to include the tlhelp32.h file.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412820
Note that these functions are only available in windows 95.  That is why the file is not automatically included.  
0
 

Author Comment

by:gnik
ID: 1412821
I should have said, tlhelp32.h has been included and it is on windows 95.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 11

Expert Comment

by:alexo
ID: 1412822
You need to add the library TH32.LIB to your linker settins (list of libraries).
Note that "Unresolved external symbol" is a linker error and cannot be resolved by include files.
0
 

Author Comment

by:gnik
ID: 1412823
how do you go about adding libraries to your linker settings?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412824
Alexo is right of course.  I don't know what I was thinking.

In Microsoft VC+, choose "Project"->"Add to Project"->"Files".  Then add the .lib file.

In Borland C++ there is a similar option, but I don't know the details.

In Builder.  You open up the project manager andn right click on the project then select "add" and add the .lib file.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1412825
>> I don't know what I was thinking.
About defwnd.c perchance?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1412826
Hey, I resent that.  You are suggesting that I have a one-track mind.  Nothing could be further from the truth.  In fact I have som many things on my mind that...what was I saying?
0
 

Author Comment

by:gnik
ID: 1412827
I am going to reopen this question so that I can grade alexo's answer.
Thanks for the help. The problem's sorted.
0
 
LVL 11

Accepted Solution

by:
alexo earned 30 total points
ID: 1412828
Thank you.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question