Cannot solve these linker errors, please help

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
.



Relevant Pages

  • Re: Cannot solve these linker errors, please help
    ... but for the first time I've to write ANSI C code using Visual Studio ... int main ... void dislpay{ ...
    (microsoft.public.dotnet.languages.vc)
  • Default file encoding in Visual Studio 2008 - how to make ANSI?
    ... In Visual Studio 2008 we are using VS wizards for creating new ... to use ANSI encoding for its generated text files? ... We require ANSI files due to corporate use of Visual SourceSafe 6.0d. ...
    (microsoft.public.vsnet.general)
  • Re: Cant find PInvoke DLL sqlceme30.dll (VS2005/SQLMobile)
    ... >> Visual Studio). ... Please make sure that SQL Server Mobile Edition is properly ... >>> device the first time i deploy appl. ... >>> Execute northwind example ...
    (microsoft.public.sqlserver.ce)
  • Re: Create vj# dll
    ... Open Visual Studio. ... public class Class1 implements ITest ... public void set_Value(int number) ... Open Tools + Ole/COM Object Viewer in Visual Studio. ...
    (microsoft.public.dotnet.vjsharp)
  • atlsocket.inl does not compile in unicode
    ... If want to compile a project, which uses atlsocket and has _UNICODE defined ... F:\Program Files\Microsoft Visual Studio .NET ... int FindAddr( ...
    (microsoft.public.vc.atl)