By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,070 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,070 IT Pros & Developers. It's quick & easy.

error LNK2001: unresolved external symbol - Ultra noob question

P: n/a
Hi,

I know less than a noob, I've been asked to do some compiles in VC++ 6
without knowing too much at all. (I'm a COBOL program normally so
this is all too much for me)

I open VC++6, open the workspace and then:

Build>Batch Build

I then select both my projects, click Build and get the following
errors:
-------------------Configuration: SS32X - Win32
Release--------------------
Linking...
Creating library Release/GH32X.lib and object Release/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Release/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

SS32X.exe - 3 error(s), 0 warning(s)
--------------------Configuration: SS32X - Win32
Debug--------------------
Linking...
Creating library Debug/GH32X.lib and object Debug/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Debug/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

GH32X.exe - 3 error(s), 0 warning(s)

Thanks a lot if anyone can tell me firstly what all this really means,
secondly how to resolve it, I'd appreciate details of what to type
where, I might not understand the instructions otherwise ;))))

Cheers

Yaz
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
First, the right newsgroup for this questions is comp.os.ms-
windows.programmer.win32.

Secondly, it looks like you are not linking the windows libraries
correctly, as your undefined symbols are registry-related. Ask the
question in the windows newsgroup, maybe someone can tell you which .LIB
file you have to make sure you;re linking into your project.

--
gabriel
Jul 22 '05 #2

P: n/a
The linker can't find some functions which is used by your files. Maybe
there's some external libraries used? In that case you might want to look at
the project settings and then the Link Tab. Select the category Input and
then there's a setting "Additional library path". If the project uses
external libraries, enter the path to them there and try compiling it again.
:)

/Carl

"We need more power captain" <kn**********@hotmail.com> wrote in message
news:8f**************************@posting.google.c om...
Hi,

I know less than a noob, I've been asked to do some compiles in VC++ 6
without knowing too much at all. (I'm a COBOL program normally so
this is all too much for me)

I open VC++6, open the workspace and then:

Build>Batch Build

I then select both my projects, click Build and get the following
errors:
-------------------Configuration: SS32X - Win32
Release--------------------
Linking...
Creating library Release/GH32X.lib and object Release/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Release/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

SS32X.exe - 3 error(s), 0 warning(s)
--------------------Configuration: SS32X - Win32
Debug--------------------
Linking...
Creating library Debug/GH32X.lib and object Debug/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Debug/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

GH32X.exe - 3 error(s), 0 warning(s)

Thanks a lot if anyone can tell me firstly what all this really means,
secondly how to resolve it, I'd appreciate details of what to type
where, I might not understand the instructions otherwise ;))))

Cheers

Yaz

Jul 22 '05 #3

P: n/a
checkout what are the *.lib files required for WriteRegistry and other
functions for which u get the error. U can get this infor from MSDN.
Then try compiling it.

Muthu
Home: http://www.codersource.net

kn**********@hotmail.com (We need more power captain) wrote in message news:<8f**************************@posting.google. com>...
Hi,

I know less than a noob, I've been asked to do some compiles in VC++ 6
without knowing too much at all. (I'm a COBOL program normally so
this is all too much for me)

I open VC++6, open the workspace and then:

Build>Batch Build

I then select both my projects, click Build and get the following
errors:
-------------------Configuration: SS32X - Win32
Release--------------------
Linking...
Creating library Release/GH32X.lib and object Release/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Release/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

SS32X.exe - 3 error(s), 0 warning(s)
--------------------Configuration: SS32X - Win32
Debug--------------------
Linking...
Creating library Debug/GH32X.lib and object Debug/GH32X.exp
COUIFUNC.obj : error LNK2001: unresolved external symbol "long __cdecl
ReadRegistry(char *)" (?ReadRegistry@@YAJPAD@Z)
COUIFUNC.obj : error LNK2001: unresolved external symbol "int __cdecl
WriteRegistry(long,long)" (?WriteRegistry@@YAHJJ@Z)
Debug/GH32X.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

GH32X.exe - 3 error(s), 0 warning(s)

Thanks a lot if anyone can tell me firstly what all this really means,
secondly how to resolve it, I'd appreciate details of what to type
where, I might not understand the instructions otherwise ;))))

Cheers

Yaz

Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.