Hey folks,
I think this is a configuration issue. I have 3 projects running under
one solution, 1 is a Windows service, 1 is a administration module and
another a class library (dll) that is used by the service. Some files
are shared among the projects, like user settings. I am "linking" the
shared files to the projects by using the "Open link" option when adding
an existing item to a project. However when I compile, I get the age-old
"multiply defined reference" error a couple of hundred times. The reason
is because the service includes a link to the shared file, and the class
module includes a link to the shared file. The service has a reference
to the class library and because of this, the compiler finds the objects
multiply defined. In the C++ days, this was cured with #ifdef
FILE_NAME....#e ndif. Not that i like that answer, it worked. Does anyone
know how to get around this? Thank you much!
Jason 4 1260
"Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message
news:eK******** ******@TK2MSFTN GP15.phx.gbl... Hey folks,
I think this is a configuration issue. I have 3 projects running under one solution, 1 is a Windows service, 1 is a administration module and another a class library (dll) that is used by the service. Some files are shared among the projects, like user settings. I am "linking" the shared files to the projects by using the "Open link" option when adding an existing item to a project. However when I compile, I get the age-old "multiply defined reference" error a couple of hundred times. The reason is because the service includes a link to the shared file, and the class module includes a link to the shared file. The service has a reference to the class library and because of this, the compiler finds the objects multiply defined. In the C++ days, this was cured with #ifdef FILE_NAME....#e ndif. Not that i like that answer, it worked. Does anyone know how to get around this? Thank you much!
Why not redesign those files so that they can be put into one common
assembly and just reference them?
So you mean to make a new project? Doesn't a project have to have an
output of a dll in order to be referenced?
Also, I should mention that I have these files under their own namespace
("FpHost.Shared "), and include them in my projects with "using
FpHost.Shared;"
Daniel O'Connell [C# MVP] wrote: "Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message news:eK******** ******@TK2MSFTN GP15.phx.gbl...
Hey folks,
I think this is a configuration issue. I have 3 projects running under one solution, 1 is a Windows service, 1 is a administration module and another a class library (dll) that is used by the service. Some files are shared among the projects, like user settings. I am "linking" the shared files to the projects by using the "Open link" option when adding an existing item to a project. However when I compile, I get the age-old "multiply defined reference" error a couple of hundred times. The reason is because the service includes a link to the shared file, and the class module includes a link to the shared file. The service has a reference to the class library and because of this, the compiler finds the objects multiply defined. In the C++ days, this was cured with #ifdef FILE_NAME....#e ndif. Not that i like that answer, it worked. Does anyone know how to get around this? Thank you much!
Why not redesign those files so that they can be put into one common assembly and just reference them?
"Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message
news:ew******** ******@TK2MSFTN GP09.phx.gbl... So you mean to make a new project? Doesn't a project have to have an output of a dll in order to be referenced?
Yes. It sounds like this is common functionality that should be packaged
into a common library, hence an assembly exposing the classes.
Also, I should mention that I have these files under their own namespace ("FpHost.Shared "), and include them in my projects with "using FpHost.Shared;"
Daniel O'Connell [C# MVP] wrote: "Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message news:eK******** ******@TK2MSFTN GP15.phx.gbl...
Hey folks,
I think this is a configuration issue. I have 3 projects running under one solution, 1 is a Windows service, 1 is a administration module and another a class library (dll) that is used by the service. Some files are shared among the projects, like user settings. I am "linking" the shared files to the projects by using the "Open link" option when adding an existing item to a project. However when I compile, I get the age-old "multiply defined reference" error a couple of hundred times. The reason is because the service includes a link to the shared file, and the class module includes a link to the shared file. The service has a reference to the class library and because of this, the compiler finds the objects multiply defined. In the C++ days, this was cured with #ifdef FILE_NAME... .#endif. Not that i like that answer, it worked. Does anyone know how to get around this? Thank you much!
Why not redesign those files so that they can be put into one common assembly and just reference them?
Dan is giving you some solid advice. From a security standpoint sometimes
you really need the settings being read from within the project though. If you
need such security, you can change the shared file to have internal visibility.
That way, the code included in both projects will only be visible within those
two projects. They can each have their own versions, without any conflict
and you should be good to move on to your next problem.
--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in message
news:uC******** ******@TK2MSFTN GP10.phx.gbl... "Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message news:ew******** ******@TK2MSFTN GP09.phx.gbl... So you mean to make a new project? Doesn't a project have to have an output of a dll in order to be referenced?
Yes. It sounds like this is common functionality that should be packaged into a common library, hence an assembly exposing the classes.
Also, I should mention that I have these files under their own namespace ("FpHost.Shared "), and include them in my projects with "using FpHost.Shared;"
Daniel O'Connell [C# MVP] wrote: "Jason Hurder" <jhurder@spam_m e_not.fastpicsy stems.com> wrote in message news:eK******** ******@TK2MSFTN GP15.phx.gbl...
Hey folks,
I think this is a configuration issue. I have 3 projects running under one solution, 1 is a Windows service, 1 is a administration module and another a class library (dll) that is used by the service. Some files are shared among the projects, like user settings. I am "linking" the shared files to the projects by using the "Open link" option when adding an existing item to a project. However when I compile, I get the age-old "multiply defined reference " error a couple of hundred times. The reason is because the service includes a link to the shared file, and the class module includes a link to the shared file. The service has a reference to the class library and because of this, the compiler finds the objects multiply defined. In the C++ days, this was cured with #ifdef FILE_NAME....#e ndif. Not that i like that answer, it worked. Does anyone know how to get around this? Thank you much! Why not redesign those files so that they can be put into one common assembly and just reference them?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: aerobar2 |
last post by:
When I debug my application I get "no symbols loaded"
=================
'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded.
'MHSFire': Loaded 'C:\Documents and Settings\bamason\My Documents\Visual Studio Projects\MHSFire\bin\MHSFire.exe', Symbols loaded.
'MHSFire.exe': Loaded 'c:\winnt\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll', No symbols...
|
by: eScrewDotCom |
last post by:
www.eScrew.com
eScrew
Welcome to eScrew!
eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew
story if you promise eScrew to consider eScrew story as joke. eScrew
story is very funny. eScrew story is so funny that eScrew will have to
take break from time to time because eScrew needs some rest from
laughing. Oh boy, here it comes... eScrew funny laugh laughing
|
by: Bruno van Dooren |
last post by:
Hi,
i am using a third party static library (.lib) that wraps a class interface
around an old C-style dll. in the static library they use the STL for some
stuff i don't know about.
in my own code, i also use the STL, for basic_string for example.
at link time, i get a lot of errors like:
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: __thiscall
|
by: Marcelo |
last post by:
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@YAPAXI@Z) already
defined in LIBCMTD.lib(new.obj)
|
by: mark |
last post by:
I have an asp.net ecommerce web application on a remote web server.
I'm using an Access database on the back end. I've notice a few
strange things. When I mimic an multiple user environment by surfin
it in multiple browsers simultaneously the site generates a generic
runtime error after awhile. I'm thinking this has something to do
with my access database and multiple connections. I'm using forms
authentication with a login page. Is...
| |
by: yossi.kreinin |
last post by:
Hi!
When are multiple definitions of global variables with the same name
considered legal in C, and how is it different from C++? It appears
that in terms of assembly language, some C definitions are translated
to "weak" symbols, in which case multiple definitions are merged by the
linker, while some become "normal" symbols, triggering linker errors in
case they are defined more then once. Is it true that in C++, multiple
definitions...
|
by: pengbsam |
last post by:
Hello:
I need to write a program that search through multiple level BOM,
get all the items. It seems like a easy enough project, but when I put
my hands on it and couple of hundred lines of codes later. It starts
look more difficult. I was hopeing someone might have a very easy way
to do it that I don't know about... The BOM structure looks like this..
Father Child
A 1
A 2
|
by: 2b|!2b==? |
last post by:
I am attempting to manually load debug symbols for a module. I am doing
it by carrying out the ff steps:
i). Select the call stack window
ii). right click and select 'Load Symbols' from displayed menu
iii). The Find Symbols: MyModule.pdb dialog box is displayed
However, when I navigate to and select the correct pdb file
(myModule.pdb), an error message is displayed with the message:
|
by: Richard |
last post by:
1. Are there any problems with having, for instance, POSIX's "open"
function #defined more than once. In my case, these would be in
different static libraries:
#ifdef __cplusplus
extern "C" {
#endif
#define open myOpenFunction1
|
by: anon.asdf |
last post by:
In terms of efficieny:
Is it better to use multiple putchar()'s after one another as one gets
to new char's
OR
is it better to collect the characters to a char-array first, and then
use puts() to print to screen
????
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |