473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

C/C++ Link errors

Dear Friend,
I got the following link error while Building my code. The main problems are in dos.h and MMSystem.h, portability. I am using a Visual studio express edition 2008 Compiler. Please help


***************************Link errors in DOS.h***********************************
__________________________________________________ ___________________________________
PC.obj : error LNK2001: OSTickDOSCtr = 1;
PC.obj : error LNK2019: pscr = MK_FP(DISP_BASE, 0x0000);
error LNK2019: void *PC_VectGet (INT8U vect)
{
return (getvect(vect));
}
PC.obj : error LNK2019: void PC_VectSet (INT8U vect, void (*isr)(void))
{
//setvect(vect, (void) interrupt (*)(void) isr);
setvect(vect, isr);
}
__________________________________________________ ______________________________________

*****************************Link errors in MMSystem.h*****************************
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeKillEvent@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeSetEvent@20 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeGetDevCaps@8 referenced in function _OSStartHighRdy
__________________________________________________ ______________________________________
Compiling...
stdafx.cpp
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
PC.obj : error LNK2019: unresolved external symbol _MK_FP referenced in function _PC_DispClrScr
PC.obj : error LNK2001: unresolved external symbol _OSTickDOSCtr
PC.obj : error LNK2019: unresolved external symbol _getvect referenced in function _PC_VectGet
PC.obj : error LNK2019: unresolved external symbol _setvect referenced in function _PC_VectSet
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeKillEvent@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeSetEvent@20 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function _OSStartHighRdy
os_cpu_c.obj : error LNK2019: unresolved external symbol __imp__timeGetDevCaps@8 referenced in function _OSStartHighRdy
EX1L.obj : error LNK2019: unresolved external symbol _random referenced in function _Task
C:\Documents and Settings\ecc04\Desktop\x1\x11\Debug\x11.exe : fatal error LNK1120: 10 unresolved externals
Build log was saved at "file://c:\Documents and Settings\ecc04\Desktop\x1\x11\x11\Debug\BuildLog.h tm"
x11 - 11 error(s), 47 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Rgds,
May 3 '10 #1
2 6210
jkmyoung
2,057 Expert 2GB
You must be missing some header declarations.
In what file do you declare __imp__timeEndPeriod ?
Create an include instruction to that file.
May 3 '10 #2
weaknessforcats
9,208 Expert Mod 8TB
These are all linker errrors. That means everything compiled correctly so there are no missing headers. What's missing os the library, or libraries, that containe the code for these unresolved items.

Add these libraries to your project as additional linker dependencies by accessing your project properties.
May 3 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Xiaofeng Zhang | last post by:
when I compile my project setting, there are many LINK errors. But when I compile my project under debug setting, everything is OK. How can I deal with it? The errors is followed. Linking......
0
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to...
1
by: Shea Martin | last post by:
I have a static lib, libA.a, with class A in it. I created a class B, which has a member std::list<A>. B.cpp compiles fine. But when I try to build a program, against B.o and libA.a, I get...
0
by: Ladvánszky Károly | last post by:
Trying to use the <vector> templates, I get many link errors similar to this one: "DC_3Daux error LNK2019: unresolved external symbol ___CxxFrameHandler referenced in function...
3
by: Leith Bade | last post by:
I have been trying to use the new Visual C++ Toolkit 2003 with the VC6 IDE I set up the executable, inlcude, and library directories to point to the new compilers I had to fix a few errors in the...
10
by: Ian Lazarus | last post by:
Hello. How do "unresolved token" link errors occur. How do I fix them? Linking... LINK : error LNK2020: unresolved token (0A000015) ??_7type_info@@6B@ LINK : error LNK2020: unresolved token...
2
by: Bruce | last post by:
I am converting a DLL project from VC7 to VC8. The project is a managed C++ DLL. The project uses a non managed C++ library compiled an linked in VC7 which uses the STL. I just about got...
2
by: Angus | last post by:
Hello I am using some classes from a third party and have included them in my projecxt and am compiling and linking with them. Everything compiles ok but I get these link errors: I added...
5
by: Bruce | last post by:
I am getting a lot of link errors when compiling in the debug build but not release. I am compiling a CLR managed code class library. I believe the link errors are actually being caused by a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.