473,383 Members | 1,832 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,383 software developers and data experts.

Linker 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

Jul 21 '05 #1
0 1731

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...
1
by: adeht | last post by:
In his book, "Modern C++ Design", Andrei Alexandrescu presents a Generic Object Factory class (Loki::Factory). One of its advantages (also mentioned in the book) is being able to register the...
2
by: Joske | last post by:
Hi, I'm having a similar problem as Scott. A static library with managed C++ functions fails to link in. See http://groups.google.be/groups?q=managed+C%2B%...
3
by: Chucker | last post by:
Hi Folks, I got a Wrapper Dll around a native C++ static library. In .NET 1.1 this worked fine. When moving to .NET 2.0 I get a couple of unresolved externals / linker errors: Error 16 error...
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: Robbie Hatley | last post by:
"Victor Bazarov" <v.Abazarov@comAcast.net> wrote: > Robbie Hatley wrote: > > > > I ran into a problem a few days ago when I added a couple of > > template functions to one of my personal...
2
by: Oneironaut | last post by:
Hello friends, I have an issue with a linker warning. It is the warning LNK4089. I am working in MSVC6.0 I investigated and this warning tells that the import of the library to which it makes...
2
by: Markus Dehmann | last post by:
What to do if an external library is header-files-only (but you have to use it), and you get lots of linker errors? You will necessarily get linker errors "multiple definition of ..." if you try...
2
by: NvrBst | last post by:
I have C99 code (which I changed extensions to .cpp to compile as C+ +98). Which is does fine. I create a Static Library Project (.lib) and Build, and it builds the .obj files (9 of them) and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
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,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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 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.