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!
Jason 4 1241
"Jason Hurder" <jhurder@spam_me_not.fastpicsystems.com> wrote in message
news:eK**************@TK2MSFTNGP15.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?
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_me_not.fastpicsystems.com> wrote in message news:eK**************@TK2MSFTNGP15.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?
"Jason Hurder" <jhurder@spam_me_not.fastpicsystems.com> wrote in message
news:ew**************@TK2MSFTNGP09.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_me_not.fastpicsystems.com> wrote in message news:eK**************@TK2MSFTNGP15.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**************@TK2MSFTNGP10.phx.gbl... "Jason Hurder" <jhurder@spam_me_not.fastpicsystems.com> wrote in message news:ew**************@TK2MSFTNGP09.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_me_not.fastpicsystems.com> wrote in message news:eK**************@TK2MSFTNGP15.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?
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...
|
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...
|
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...
|
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),...
|
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...
|
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...
|
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...
|
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...
|
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" {...
|
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...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
| |