I try run this program(TestLib1.asm) Click Here in my Visual Studio 2012 pro but I got errors
I think the erros not in code I think in my Visual Studio 2012 configuration!

Anyone know how can I fix it

Error3  error LNK2005: _main@0 already defined in proj1.obj 
Error4  error LNK2019: unresolved external symbol _Clrscr@0 referenced in function _main@0  
Error6  error LNK2019: unresolved external symbol _Clrscr@0 referenced in function _main@0  c:\Users\

'"c:\users\win8\documents\visual studio 2012\Projects\proj\Debug\p
roj.exe"' is not recognized as an internal or external command, operable program or batch file.
Press any key to continue . . .

I apriciate your help

Recommended Answers

All 2 Replies

That's a pretty simple one. There's no definition of the _Clrscr function anywhere in the translation unit. Visual Studio doesn't come packaged with any form of clrscr as a "standard" library, so you need to consider the following:

  1. Did you declare it somewhere but not define it?
  2. Are you using a third party library that declares it but not link with that library?
  3. Was the code written for a different compiler in a non-standard manner?


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.