Connecting Tech Pros Worldwide Forums | Help | Site Map

error LNK2001: unresolved external symbol - Ultra noob question

We need more power captain
Guest
 
Posts: n/a
#1: Jul 22 '05
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

gabriel
Guest
 
Posts: n/a
#2: Jul 22 '05

re: error LNK2001: unresolved external symbol - Ultra noob question


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
Carl Ribbegaardh
Guest
 
Posts: n/a
#3: Jul 22 '05

re: error LNK2001: unresolved external symbol - Ultra noob question


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" <knuckles_doa@hotmail.com> wrote in message
news:8fc35a4e.0402170906.4ba9b837@posting.google.c om...[color=blue]
> 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[/color]


Muthu
Guest
 
Posts: n/a
#4: Jul 22 '05

re: error LNK2001: unresolved external symbol - Ultra noob question


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

knuckles_doa@hotmail.com (We need more power captain) wrote in message news:<8fc35a4e.0402170906.4ba9b837@posting.google. com>...[color=blue]
> 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[/color]
Closed Thread