Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Library problems in Linker

Author
Message
tkrausse
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location:
Posted: 25th Mar 2009 02:20
Well, I'm working my first project, and ran into a small problem... The program won't compile, or to be more accurate, it won't link properly. When I try to compile, I get the following errors (copied direct from Visual Studio):

1>------ Build started: Project: DSU Pre-alpha, Configuration: Debug Win32 ------
1>Linking...
1>libcpmtd.lib(xdebug.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Main.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: __thiscall std::_Deque_const_iterator<enum eInput,class std::allocator<enum eInput>,1>::_Deque_const_iterator<enum eInput,class std::allocator<enum eInput>,1>(unsigned int,class std::_Container_base_secure const *)" (??0?$_Deque_const_iterator@W4eInput@@V?$allocator@W4eInput@@@std@@$00@std@@QAE@IPBV_Container_base_secure@1@@Z)
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>Debug\DSU Pre-alpha.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://c:\Users\Tom\Documents\Visual Studio 2008\Projects\DSU Pre-alpha\DSU Pre-alpha\Debug\BuildLog.htm"
1>DSU Pre-alpha - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I currently have the linker set to ignore the following librarys:
libcmtd, msvcrt, atls, libcp

If anyone knows how to resolve these problems, it would be much appreciated.

Thank you in advance
Sharp Bullet
16
Years of Service
User Offline
Joined: 5th Feb 2008
Location: Pluto
Posted: 25th Mar 2009 18:38


if you declare a variable or a function in youre program and that was before declared in a library you may get this error:

do you have a function or variable called '__CrtDbgReportW' ?
if the answer is yes try to rename to something else...

i'm not sure that this is the answer to youre question but give it a try!

you can set the compiler to ignore this library too : 'libcpmtd', but i don't know for what it's used.

First say to yourself what you would be; and then do what you have to do.
tkrausse
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location:
Posted: 25th Mar 2009 20:36
Well, after playing for a bit, I went back and reverted a few recent changes, and it seemed to help. Specifically, I removed

#include <queue>,

and the errors went away. That said, I was hoping to use it, so I'm still looking.

Thanks for the help
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 25th Mar 2009 23:33
This is a problem when you start to use functions in the standard libraries. If you build it in Release mode do the errors go away?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Wells
15
Years of Service
User Offline
Joined: 25th Mar 2009
Location:
Posted: 27th Mar 2009 01:59
I was using <list>, and building in release mode did indeed get rid of the errors. Shame I can't debug though : /
tkrausse
15
Years of Service
User Offline
Joined: 24th Mar 2009
Location:
Posted: 27th Mar 2009 02:11
Never tried, but I think I came up with a way to get rid of the queue class, so for now it doesn't look like a problem again.

Thanks for the help

Login to post a reply

Server time is: 2024-09-30 21:21:40
Your offset time is: 2024-09-30 21:21:40