![]() |
| | #1 |
| Registered User Join Date: Aug 2007
Posts: 18
| New to Visual Studio 2008 Code: 1>test.obj : error LNK2019: unresolved external symbol "void __cdecl menu(struct Store,int)" (?menu@@YAXUStore@@H@Z) referenced in function _main 1>test.obj : error LNK2019: unresolved external symbol "int __cdecl getData(struct Store,int)" (?getData@@YAHUStore@@H@Z) referenced in function _main 1>test.obj : error LNK2019: unresolved external symbol "void __cdecl display(struct Store,int)" (?display@@YAXUStore@@H@Z) referenced in function "void __cdecl menu(struct Store * const,int)" (?menu@@YAXQAUStore@@H@Z) 1>test.obj : error LNK2019: unresolved external symbol "void __cdecl reData(struct Store &,int)" (?reData@@YAXAAUStore@@H@Z) referenced in function "void __cdecl menu(struct Store * const,int)" (?menu@@YAXQAUStore@@H@Z) 1>C:\Users\Barazin\Documents\Visual Studio 2008\Projects\test2\Debug\test2.exe : fatal error LNK1120: 4 unresolved externals |
| bargomer is offline | |
| | #2 |
| Banned Join Date: Aug 2001 Location: Visalia, CA, USA
Posts: 3,699
| When you run it via debug, it should automatically require user input at the end of execution. May I see your code so I can appropriately answer your question. |
| master5001 is offline | |
| | #3 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| The errors you are seeing looks like your project doesn't have all the source files it needs (particularly, you have a menu function call in main, but the compiler can't find the actual menu function - I'm guessing that the menu function is in a different file and that this file is not part of your project definition - you need to use "add file..." to add the file to your project). -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #4 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Run without debug (Ctrl + F5) or set a breakpoint at the end of main (F9) and debug (F5).
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
| | #5 |
| Registered User Join Date: Aug 2007
Posts: 18
| I found the reason for it not compiling. Apparently you cannot copy and paste code into the source file after you already built the solution. |
| bargomer is offline | |
| | #6 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| Hm? I get the feeling that it's something else that you did... Building the solution just compiles the code. Of course you must be able to recompile the code after you've compiled it before...
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| more then 100errors in header | hallo007 | Windows Programming | 20 | 05-13-2007 08:26 AM |
| We Got _DEBUG Errors | Tonto | Windows Programming | 5 | 12-22-2006 05:45 PM |
| C++ std routines | siavoshkc | C++ Programming | 33 | 07-28-2006 12:13 AM |
| load gif into program | willc0de4food | Windows Programming | 14 | 01-11-2006 10:43 AM |
| Learning OpenGL | HQSneaker | C++ Programming | 7 | 08-06-2004 08:57 AM |