[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

LNK1120: 1 unresolved externals

Posted on 2000-02-29
2
Medium Priority
?
1,302 Views
Last Modified: 2008-02-26
Hi

My system:
WinNT4.x

My develop env.:
MSVC++ 6.x
  Not using MFC

My link´d libs (a few of them):
msvcrtd.lib, msvcrt.lib, mapi32.lib, version.lib, exchsdk.lib, user32.lib

My "#include"´s (some of them):
<iostream.h>
<fstream.h>
"edk.h"
<string.h>

My problem:
Linking...
libcid.lib(filebuf.obj) : error LNK2001: unresolved external symbol ___pioinfo
Debug/Xyz.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Xyz.exe - 2 error(s), 0 warning(s)

0
Comment
Question by:Nusse
[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
2 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2570886
pioinfo is not somthing defined by the C++ standard or the windows API.  So it is probably somthing you defined, right?  if so you need to link your program to the object file (.obj) produced when you compile the code that contains pioinfo's definition.

From what little code youve' posted, it seems like it might be defined in a file called edk.cpp, is that right?  If so then you need to compile edk.cpp and link to edk.obj.  (This will be done automaticaly if edk.cpp is included as one of the files in the project.)

If that isn't enough to help, can you give us some more info to work with.
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 300 total points
ID: 2571026
You're linking the wrong libraries.

First, you should be linking either MSVCRT.LIB or MSVCRTD.LIB but not both.

If you're linking with MSVCRT[d].LIB, you should have /MD or /MDd one the compiler's command line.  I don't think you do. As a result, you're not defining _MT nor _DLL, so the standard library headers are referencing LIBCID.LIB, which causes you to need pioinfo. Normally, pioinfo comes from LIBC.LIB, But LIBC.LIB is incompatible with MSVCRT[d].LIB.

You need to either:

1) define _MT and _DLL and link with MSVCRT[d].LIB. The easiest way to do that is to quit giving the MSVCRT[d].LIB name to the linker and use /MD or /MDd on the compiler command line

2) link to LIBCI[d].LIB and LIBC[d].LIB directly, and don't link to MSVCRT[d].LIB.

NOTE: When I write SomeName[d].LIB, I mean SomeName.LIB for retail builds and SomeNameD.LIB for debug builds. Because you've got LIBCID.LIB, it's obvious this error comes from a debug build.

NOTE #2: /MD is for release builds and /MDd is for debug builds.

..B ekiM
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

649 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