473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Link errors when including a static library

TGF
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
Windows Form applications, so I also need to know how to do it for that as
well). After doing this, I attempt to build and run my console app but the
following linker errors occur (have include the /FORCE switch to force it to
run)....

LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE'
specification
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _sprintf already defined in
LIBCMTD.lib(sprintf.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: __CrtDbgReport already defined
in LIBCMTD.lib(dbgrpt.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: __resetstkoflw already defined
in LIBCMTD.lib(resetstk.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _malloc already defined in
LIBCMTD.lib(dbgheap.obj); second definition ignored
msvcrtd.lib(MSVCR71D.dll) : warning LNK4006: _free already defined in
LIBCMTD.lib(dbgheap.obj); second definition ignored
msvcrtd.lib(ti_inst.obj) : warning LNK4006: "private: __thiscall
type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z)
already defined in LIBCMTD.lib(typinfo.obj); second definition ignored
msvcrtd.lib(ti_inst.obj) : warning LNK4006: "private: class type_info &
__thiscall type_info::operator=(class type_info const &)"
(??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj);
second definition ignored
LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other
libs; use /NODEFAULTLIB:library
Debug/cptest.exe : warning LNK4088: image being generated due to /FORCE
option; image may not run

....Does anyone know what could be causing these errors? I tried mixing and
shuffling #include directives, but I still get the same problems. Any help
would be appreciated.
-T Bone


Nov 22 '05 #1
0 835

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

Similar topics

0
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...
2
by: Ricky Corsi | last post by:
hello everybody, I have an application that uses a 3D engine library compiled as a static library called EnRG.lib. My own code is normally compiled against the MS Visual C implementation of the...
10
by: Gary Hughes | last post by:
I'm getting the following error when attempting to link a managed C++ dll. I can't find any reference to these errors with google. Can anyone help? I've included the class definition causing the...
5
by: Bruce | last post by:
I am getting a lot of link errors when compiling in the debug build but not release. I am compiling a CLR managed code class library. I believe the link errors are actually being caused by a...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
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...
0
marktang
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,...
0
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...
0
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,...
0
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...
0
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,...

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.