469,134 Members | 1,315 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,134 developers. It's quick & easy.

error LNK2001: unresolved external symbol - Ultra noob question

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
3 5718
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
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
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.

Similar topics

1 post views Thread by yanwan | last post: by
2 posts views Thread by Helen | last post: by
2 posts views Thread by Mary | last post: by
4 posts views Thread by Sanjay Kumar | last post: by
1 post views Thread by developer | last post: by
6 posts views Thread by sadegh | last post: by
1 post views Thread by mahricky | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.