Cannot solve these linker errors, please help
- From: Oltmans <rolf.oltmans@xxxxxxxxx>
- Date: Tue, 7 Oct 2008 18:32:04 -0700 (PDT)
Hi all,
I've been writing C# code using Visual Studio 2005 for some time now
but for the first time I've to write ANSI C code using Visual Studio
2005. I followed this article http://support.microsoft.com/kb/829488
that does a good job of explaining how to write ANSI C using Visual
Studio 2005.
When I write the following program it compiles and runs fine. I get
the "Hello World" message shown in the command prompt.
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello World\n");
return 0;
}
However, when I run the following program I get two errors
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello World\n");
display();
return 0;
}
void dislpay(){
printf("Hi, this is display()");
}
Here are the errors
1- Error 2 error LNK2019: unresolved external symbol _display
referenced in function _main Test.obj
2- Error 3 fatal error LNK1120: 1 unresolved externals C:\Documents
and Settings\Otlmans\My Documents\Visual Studio 2005\Projects\C
\FirstApplication\Debug\FirstApplication.exe
I've searched Internet and read various forum posts from people who
experienced similar error but I'm unable to resolve above two errors.
I'm new to ANSI C so any help will be highly appreciated. Thanks in
advance.
Thanks,
Oltmans
.
- Follow-Ups:
- Re: Cannot solve these linker errors, please help
- From: Cholo Lennon
- Re: Cannot solve these linker errors, please help
- Prev by Date: Help Workshop HCW
- Next by Date: Re: Cannot solve these linker errors, please help
- Previous by thread: Help Workshop HCW
- Next by thread: Re: Cannot solve these linker errors, please help
- Index(es):
Relevant Pages
|