Computer Science Canada VS2008: Error LNK2019 |
Author: | deltatux [ Sun Jan 18, 2009 7:23 pm ] | ||||||||
Post subject: | VS2008: Error LNK2019 | ||||||||
Hey guys I've got some errors. My friend told me it's missing the body of my function. However, my body is obviously there when you look at this post: pointofsales.h:
stdheader.h:
pointofsales.cpp:
libpos.cpp (not finished):
Build Error: Quote: 1>------ Build started: Project: Workshop2, Configuration: Debug x64 ------ 1>Linking... 1>pointofsales.obj : error LNK2019: unresolved external symbol "void __cdecl posmath(int *,double *,char)" (?posmath@@YAXPEAHPEAND@Z) referenced in function "void __cdecl initPOS(void)" (?initPOS@@YAXXZ) 1>D:\devel\c++\Workshop2\x64\Debug\Workshop2.exe : fatal error LNK1120: 1 unresolved externals 1>Build log was saved at "file://d:\devel\c++\Workshop2\Workshop2\x64\Debug\BuildLog.htm" 1>Workshop2 - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== This is a console application, I tried both compiling it to x86 and x86_64. Please help? Thanks, deltatux |
Author: | OneOffDriveByPoster [ Sun Jan 18, 2009 11:19 pm ] |
Post subject: | Re: VS2008: Error LNK2019 |
deltatux @ Sun Jan 18, 2009 7:23 pm wrote: Hey guys I've got some errors. My friend told me it's missing the body of my function. However, my body is obviously there when you look at this post. You function body is missing. You have a function with the same name, but they are not the same function. |
Author: | DemonWasp [ Mon Jan 19, 2009 10:42 am ] | ||||
Post subject: | RE:VS2008: Error LNK2019 | ||||
This is the line from pointofsales.h:
This is the line from libpos.cpp:
There is a subtle but very important difference between these two lines. |
Author: | deltatux [ Tue Jan 20, 2009 5:05 pm ] | ||||||
Post subject: | RE:VS2008: Error LNK2019 | ||||||
Thanks, I solved it, there were also additional logic errors found. However, once I got the compiler working I got another quirk. ![]() Source code:
Any ideas for fixes? Thanks, deltatux |
Author: | OneOffDriveByPoster [ Tue Jan 20, 2009 5:56 pm ] |
Post subject: | Re: RE:VS2008: Error LNK2019 |
Please mark GNU source as NFW in the future. |
Author: | deltatux [ Tue Jan 20, 2009 7:40 pm ] |
Post subject: | RE:VS2008: Error LNK2019 |
NFW? I'm not sure what that is. deltatux |
Author: | OneOffDriveByPoster [ Tue Jan 20, 2009 11:05 pm ] |
Post subject: | Re: RE:VS2008: Error LNK2019 |
deltatux @ Tue Jan 20, 2009 7:40 pm wrote: NFW?
"Not for work", or rather--clarify to say "don't look at this because it has GPL on it".I'm not sure what that is. |
Author: | deltatux [ Wed Jan 21, 2009 1:03 am ] |
Post subject: | RE:VS2008: Error LNK2019 |
When did GPLing things must be for commercial use? This is an education-derived work, I've seen many educational work been GPL'd before. I just don't want people to take my work and abuse it without recognition. I could of released it under a BSD license. Anyways, thanks for the head's up though. This is a NOT FOR WORK software. It is purely created for educational purposes only. However, you are free to distribute and modify it under the terms of GPL. All said and done, I still need help on it. If anyone has any ideas to the problem please help. Many thanks, deltatux |
Author: | DemonWasp [ Wed Jan 21, 2009 9:19 am ] |
Post subject: | RE:VS2008: Error LNK2019 |
Your implementation of posmath ( ) appears to be quite incorrect. Take a closer look at what it actually does. |
Author: | deltatux [ Wed Jan 21, 2009 10:07 pm ] |
Post subject: | RE:VS2008: Error LNK2019 |
Alright I fixed it, it was an array overflow. The loop is looping it more than its limit. Thanks anyways, deltatux |