473,804 Members | 3,446 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 3848
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
2636
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
13119
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
2387
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
1907
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
2062
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
9585
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
10586
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
10338
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...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
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
9161
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
7622
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
5525
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...
3
2997
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.