473,795 Members | 3,215 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Linking error when using multiple forms and #include<afxine t.h>

Hello!
I am developping a Visual C++ .NET multiple forms application, which
uses FTP connection. When I use more than one form, and include the
<afxinet.h> library (necessary for FTP connection), the linker errors
occur:

error LNK2005: "void * __cdecl operator new(unsigned
int)"(??2@YAPAX I@Z) already
defined in LIBCMTD.lib(new .obj)

error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
already defined in LIBCMTD.lib(dbg del.obj)

fatal error LNK1169: one or more multiply defined symbols found

In order to be clearer, I'll tell the simple steps to create the
error: I create a Windows Form C++ .NET application; add a new form
(add element->new form); simply include the <afxinet.h> in the Form1.
Ok, if you try to run the application, it will. Now, just close the
Visual Studio, open everything again, do a NEW compilation, and try to
run. (!!!) That's the error! That's why I think it could be a bug
of the Visual Studio...

Thus, I can just work with FTP connection and only ONE form. We tried
the MSDN help, that tells to ignore the library (LIBCMTD.lib), but this
causes other link errors. We tried everything we could.
If somebody could help me anyway I thank very much.

Nov 17 '05 #1
6 3847
Are you using VC 2003 or 2005 ?

"Marcelo" wrote:
Hello!
I am developping a Visual C++ .NET multiple forms application, which
uses FTP connection. When I use more than one form, and include the
<afxinet.h> library (necessary for FTP connection), the linker errors
occur:

error LNK2005: "void * __cdecl operator new(unsigned
int)"(??2@YAPAX I@Z) already
defined in LIBCMTD.lib(new .obj)

error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
already defined in LIBCMTD.lib(dbg del.obj)

fatal error LNK1169: one or more multiply defined symbols found

In order to be clearer, I'll tell the simple steps to create the
error: I create a Windows Form C++ .NET application; add a new form
(add element->new form); simply include the <afxinet.h> in the Form1.
Ok, if you try to run the application, it will. Now, just close the
Visual Studio, open everything again, do a NEW compilation, and try to
run. (!!!) That's the error! That's why I think it could be a bug
of the Visual Studio...

Thus, I can just work with FTP connection and only ONE form. We tried
the MSDN help, that tells to ignore the library (LIBCMTD.lib), but this
causes other link errors. We tried everything we could.
If somebody could help me anyway I thank very much.

Nov 17 '05 #2
I am using the 2003 version

Nov 17 '05 #3
I already solved the problem. Thanks

Nov 17 '05 #4
What was the problem?

Brian

Nov 17 '05 #5
I just needed to set the option of Project ---> Porperties. In project
standards, I change the uses of MFC from Windows Standard Library to
Shared DLL. This way I can use the MFC libraries in a Windows Forms
Application (which is not MFC application

Nov 17 '05 #6
I just needed to set the option of Project ---> Porperties. In project
standards, I change the uses of MFC from Windows Standard Library to
Shared DLL. This way I can use the MFC libraries in a Windows Forms
Application (which is not MFC application. Very simple, but difficult
to find out

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
2634
by: Tuckers | last post by:
My question is, if I have created my own library which lives in its own install directory, to refer to its header file is it better to use #include "MyLibrary.h" or #include <MyLibrary.h> Assume that this library will be used by other groups. I think the answer
9
13117
by: bill | last post by:
Forget the exact definition of difference between, #include <foo.h> and #include "bar.h" Normally foo.h is a standard header file, so it's path is not defined in compiler option, but I am curious how compiler find it.
5
1615
by: mailtogops | last post by:
Hi All, This is very basic C/C++ question but I need internals of C/C++ how the langauge/compiler do this.. Say I have two header files 1. header1.h 2. header2.h
2
4298
by: Jofio | last post by:
I have 3 files, namely: dArray.h dArray.cp TestdArray.cpp Problem is when I compile the 'main' program - TestdArray.cpp - , it (the compiller) produces the following error: 'Unable to open include file 'dArray.h' 'Unable to open include file'dArray.cp'
4
2383
by: Anastasios Hatzis | last post by:
I'm looking for a pattern where different client implementations can use the same commands of some fictive tool ("foo") by accessing some kind of API. Actually I have the need for such pattern for my own tool (http://openswarm.sourceforge.net). I already started restructuring my code to separate the actual command implementations from the command-line scripts (which is optparser-based now) and have some ideas how to proceed. But probably...
3
1254
by: suhailkhalil | last post by:
I'm using javascirpt calendar control and using the below statement to populate date in textbox txtDate. I'm using master page in VS2005. javascript:show_calendar('document.GetElementById("<%=txtDate.ClientID%>")'); but this gives the parser error <%... %> tag cannot be used at server side I've tried <%# also but to no avail. Any help is hugely appreciated
3
1905
by: Peterwkc | last post by:
Hello all expert C++ programmer, i fairly new to C++ programming. I have a class cellphone which contain dynamic pointer. I have create (example)ten cellphone. I want to ask user for the input and store in the list and finally sort the list according to the brand of cellphone. I learn C++ by myself. Therefore, i hope someone can guide me in this matter. I not asking for solution but guideline.
2
2059
by: -Karl | last post by:
Couls someone please advise me on this error. What I am trying to do is be able to convert an XML document into arrays. I read that the subs & functions have to be in <scripttags. Thanks! Error: BC30456: 'Read_DOM' is not a member of
0
9519
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
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
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...
1
7541
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
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4113
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
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.