Link to home
Start Free TrialLog in
Avatar of Bart van der Wee
Bart van der WeeFlag for New Zealand

asked on

Unable to build new VC5++ sample files!

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)
Avatar of nil_dib
nil_dib

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?
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
Avatar of Bart van der Wee

ASKER

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.
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
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 :-)
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

Ooops... that was my answer:)
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 ;)
ASKER CERTIFIED SOLUTION
Avatar of Cov
Cov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial