Solved

Unresolved external  symbol

Posted on 1998-04-16
10
539 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
  • 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now