By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Linker Errors + Multiple Definition Warnings (Dev-C++ and VS2005)

P: n/a
Hello.

When I compile my program I recieve lots and lots of the following
message which I am trying to decipher. "xxx was declared deprecated".
What exactly does that mean?



Bank.cpp
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\bank.cpp(17) : warning C4996: 'fopen' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\stdio.h(235) : see declaration of 'fopen'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\bank.cpp(39) : warning C4996: 'fscanf' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\stdio.h(245) : see declaration of 'fscanf'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\bank.cpp(42) : warning C4996: 'strcat' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(59) : see declaration of 'strcat'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\bank.cpp(61) : warning C4996: 'sscanf' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\stdio.h(291) : see declaration of 'sscanf'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\bank.cpp(64) : warning C4996: 'strcat' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(59) : see declaration of 'strcat'
a4main.cpp
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
Account.cpp
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(24) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(82) : warning C4267: '=' : conversion from 'size_t' to
'int', possible loss of data
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(99) : warning C4267: 'return' : conversion from 'size_t'
to 'int', possible loss of data
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(106) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(109) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(114) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(119) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(126) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(128) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(129) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(137) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(140) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(145) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(150) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(157) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(160) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(164) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.cpp(168) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
account-test.cpp
c:\documents and settings\aaron\my documents\oop244\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\string.h(56) : see declaration of 'strcpy'
Generating Code...
Compiling manifest to resources...
Linking...
account-test.obj : error LNK2005: _main already defined in a4main.obj
account-test.obj : error LNK2005: "void __cdecl test2(void)"
(?test2@@YAXXZ) already defined in a4main.obj
account-test.obj : error LNK2005: "void __cdecl message(void)"
(?message@@YAXXZ) already defined in a4main.obj
Debug\1.exe : fatal error LNK1169: one or more multiply defined symbols
found
Build log was saved at "file://c:\Documents and
Settings\Aaron\Desktop\1\1\Debug\BuildLog.htm"
1 - 4 error(s), 27 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Aug 4 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Bah.

Found the problem, my project had another file it was compiling as well
with another main.

This is why I hate project solutions :)

Aug 4 '05 #2

P: 1
Bah.

Found the problem, my project had another file it was compiling as well
with another main.

This is why I hate project solutions :)
Im having the same problem i believe. You say your project had another main it was compiling as well; any idea of where this file is stored?
I have converted a project for Xcode 2.0 running on a mac to a dev c++ project, and i have a "Multiple definition error" for every method of every class i am using, totalling 192 errors. The code worked fin on the mac version of gcc.
Any information you could give would be greatly apreciated.

Many thanks,
Gavin
Apr 19 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.