?
Solved

Unable to build new VC5++ sample files!

Posted on 1999-01-14
9
Medium Priority
?
438 Views
Last Modified: 2010-10-05
I am relatively new to VC5++ programming and so I thought I would start off with the sample files that came with the VC5++ cd's. However they refuse to work, the .c files compile OK and then hen I go to build I get the following:
error LNK2001: unresolved external symbol

About 44 in total, and I cannot understand why this happens. Can anyone enlighten me?
I am running WIn95 OSR2.1 with 64MB ram, PII266, and Visual Studio Professional. (SP3)
0
Comment
Question by:Bart van der Wee
[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
  • 5
  • 3
9 Comments
 
LVL 4

Expert Comment

by:nil_dib
ID: 1182216
Check the following:
1. all the cpp files are included in your project
   (Workspace->FileView)?
2. you did not have method that is declared and not defined?
0
 
LVL 1

Expert Comment

by:Cov
ID: 1182217
Most probably, you have forgotten to include a library that need to be included.... do these examples need MFC? if so, make sure that in the project menu in settings, MFC is turned on...
Cov
0
 
LVL 4

Author Comment

by:Bart van der Wee
ID: 1182218
I added the MFC classes as suggested I now get over 200 Linke errors. All that I am wanting to do is compile and execute from the sample code. I would have thought this was ready to compile etc as it is without further mods.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:Cov
ID: 1182219
Hmmm... if you did not need mfc, take out mfc and tell me what the original link error was.  It is definitly an include library or header file.  Let me know the exact error and i will give you the solution:)
Cov
0
 
LVL 4

Author Comment

by:Bart van der Wee
ID: 1182220
OK set it back to not using MFC
here is the error listing:

--------------------Configuration: Oak - Win32 Debug--------------------
Compiling resources...
Compiling...
Arrow.c
Dialogs.c
Help.c
Profile.c
Rlmeter.c
Status.c
Toolbar.c
Vidcap.c
Vidframe.c
Linking...
Dialogs.obj : error LNK2001: unresolved external symbol __imp__mciSendStringA@16
Dialogs.obj : error LNK2001: unresolved external symbol __imp__mciSendCommandA@16
Vidcap.obj : error LNK2001: unresolved external symbol _capGetDriverDescriptionA@20
Vidcap.obj : error LNK2001: unresolved external symbol __imp__waveInOpen@24
Vidcap.obj : error LNK2001: unresolved external symbol _acmMetrics@12
Vidcap.obj : error LNK2001: unresolved external symbol _acmFormatChooseA@4
Vidframe.obj : error LNK2001: unresolved external symbol _capCreateCaptureWindowA@32
Debug/Oak.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

Oak.exe - 8 error(s), 0 warning(s)


-Thank you for your patience :-)
0
 
LVL 1

Expert Comment

by:Cov
ID: 1182221
Hmmm..  I don't recognize them from a partiular file... I think you are missing a library... I think that if you add an include for mmsystem.h
and add the import library winmm.lib to your project settings:)
That should clear some of them up:)
CoV

0
 
LVL 1

Expert Comment

by:Cov
ID: 1182222
Ooops... that was my answer:)
0
 
LVL 4

Author Comment

by:Bart van der Wee
ID: 1182223
I added in winmm.lib vfw32.lib and acm32.lib.
What .lib files should I be using all the time? I have had these problems with several tutorials but they never mentioned these.

I am pretty new to all this and as I am teaching myself it is pretty slow going. Is there any reading material or similar you would recommend?
Sorry to reject but I have increased the points,just post another answer and you'll get them.
It is good to see new people helping out so quickly ;)
0
 
LVL 1

Accepted Solution

by:
Cov earned 600 total points
ID: 1182224
Back Again,

In general if you are getting a linking file, the reason is because a library is missing... and the ones you need depends on the file.  What I tend to do is if I see a linking error, I highlight the name of the function in the link error (minus the characters at the begging... the @ or _), and search for it in help.... usually you find a description of the funciton, along with the files you need to include to use it.

Another useful technique:  do a search on the particular error you are getting (ex: LNK2001) in the help file, and you will get a desciption of why the error is occurring.
Hope this helps!
Cov
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
Suggested Courses

800 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