473,888 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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\oop24 4\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\bank.cpp(17) : warning C4996: 'fopen' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st dio.h(235) : see declaration of 'fopen'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\bank.cpp(39) : warning C4996: 'fscanf' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st dio.h(245) : see declaration of 'fscanf'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\bank.cpp(42) : warning C4996: 'strcat' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(59) : see declaration of 'strcat'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\bank.cpp(61) : warning C4996: 'sscanf' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st dio.h(291) : see declaration of 'sscanf'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\bank.cpp(64) : warning C4996: 'strcat' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(59) : see declaration of 'strcat'
a4main.cpp
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
Account.cpp
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(2 4) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(8 2) : warning C4267: '=' : conversion from 'size_t' to
'int', possible loss of data
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(9 9) : warning C4267: 'return' : conversion from 'size_t'
to 'int', possible loss of data
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 06) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 09) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 14) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 19) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 26) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 28) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 29) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 37) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 40) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 45) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 50) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 57) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 60) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 64) : warning C4996: 'strtok' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(131) : see declaration of 'strtok'
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.cpp(1 68) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.h(56) : see declaration of 'strcpy'
account-test.cpp
c:\documents and settings\aaron\ my documents\oop24 4\assignment -
4\account.h(17) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio
8\vc\include\st ring.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@@YAXX Z) 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\Deb ug\BuildLog.htm "
1 - 4 error(s), 27 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Aug 4 '05 #1
2 11200
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
spikedgav
1 New Member
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
17853
by: Georg Teichtmeister | last post by:
Hello! We are developing a math - library for realtime applications and want to use some given mathlibraries as base(ipp, MTL, .. ). Our library is a wrapper for those and you should be able to select the underlying library by template parameter. Therefore we split up our library in two namespaces: The first one defines namespace-global functions which call the baselibrary functions. These are templatefunctions which some
0
1822
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to the library in Linker-General-Addition Library Directories field under the Project options. The first question I have is....is this the correct way to include a static library. If not, then what is the correct way to do it (I need to make .NET...
0
1641
by: TGF | last post by:
Hello, I am creating a console app. I try to link a static library by including it in the Linker-Input-Additional Dependencies field under the Project properties. Then I specify the path to the library in Linker-General-Addition Library Directories field under the Project options. The first question I have is....is this the correct way to include a static library. If not, then what is the correct way to do it (I need to make .NET...
10
2216
by: william xuuu | last post by:
Actually, I also got linker errors with template functions and template classes. And I avoided both of them successfully, by pouring foo.cpp into foo.h, according to the C++ FAQ. (http://www.parashift.com/c++-faq-lite/containers-and-templates.html) And then, I pre-declared each template friend function above the definition of template class. But I still get template friends linker error. My compiler is gcc 3.3.3. Any hints? Thanks,
12
1977
by: Fabio De Francesco | last post by:
Hello. I can't understand why I can't compile the following simple code, where I think I have applied all the needed rules for templates that are declared and defined in different files (*.h and *.cpp). What amazes me is that I have already some code like this in another project where I don't get errors, so I am pretty sure I am missing some stupid thing.
4
30445
by: Andrew | last post by:
Hello, I am recieving a multiple definition error from the linker when I try to build a project I am working on. The message states that the functions I defined within an external .c source file are already defined in the main program .obj file. I declared the functions in seperate header files and used the pre-processor conditional #ifndef FILE_H to make sure each header is only included once. Each .c source file includes the...
4
7638
by: pavan734 | last post by:
Hello I have one .h file which I have includeded completely under #ifndef followed by #define guards. I have the member function definitions in the same .h file only. Still Iam getting linker errors saying that "multiple definition of the function: ". Iam getting that error for all the member functions of that class.
2
2441
by: Markus Dehmann | last post by:
What to do if an external library is header-files-only (but you have to use it), and you get lots of linker errors? You will necessarily get linker errors "multiple definition of ..." if you try to separate interface from implementation in your own code. The external-library symbols will first be defined in one .o file and then again in the next one that includes the same implementation-heavy header. Is there any way to avoid the...
1
2360
by: Abel Esgueva | last post by:
Can anyone tell me why this piece of program: typedef struct { int s0; int s1; }MyBL;
0
9800
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7990
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5817
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4243
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3251
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.