473,396 Members | 1,827 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.

Any way to use unmanaged .LIB in MCPP project?

Hello, I have a managed C++ project which uses an unmanaged C++ DLL.
Normally when I'd have an EXE or DLL which uses another DLL, I'd link
the DLL's .LIB into the project but I don't see a way to do this
within my MCPP project (so I'm left with a bunch of "unresolved
externals" errors).

Now, I could use PInvoke but this would mean having to redeclare every
function, and I'd like to not have to do this (I'm lazy and the
approach is prone to errors anyway).

There sure seems like there should be a way to do this with MCPP but I
can't figure out how.

Any suggestions (or solutions)?
Thanks,

Mark

Mar 13 '07 #1
1 1266
OK, I figured it out. When I looked at the Linker\Input section of my
MC++ project, all I saw was $(NOINHERIT) and I didn't notice that I
could add a .LIB here, just like I normally would for an unmaged C++
project, so problem solved.

Mark
On Mar 13, 3:11 pm, mark.sanders...@gmail.com wrote:
Hello, I have a managed C++ project which uses an unmanaged C++ DLL.
Normally when I'd have an EXE or DLL which uses another DLL, I'd link
the DLL's .LIB into the project but I don't see a way to do this
within my MCPP project (so I'm left with a bunch of "unresolved
externals" errors).

Now, I could use PInvoke but this would mean having to redeclare every
function, and I'd like to not have to do this (I'm lazy and the
approach is prone to errors anyway).

There sure seems like there should be a way to do this with MCPP but I
can't figure out how.

Any suggestions (or solutions)?

Thanks,

Mark

Mar 13 '07 #2

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

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
0
by: Alan Cobb | last post by:
Hi, I have a VS2003 solution that includes CSharp (CS), managed C++ (MCPP) and unmanaged C++ (UMCPP) projects. It's unclear to me how integrated the source browsing is supposed to be for all...
4
by: repstat | last post by:
Hi I have a project which is going to be doing some string manipulation which needs to be pretty fast. The user interface is going to be written in C#. I am going to write the string handling...
0
by: Ken Durden | last post by:
A little more info. I have a unmanaged C++ DLL, compiled without /CLR. Inside a Managed C++ DLL, I have the following class: MarshalWrapper.h ---- #ifdef _MANAGED __nogc #endif
3
by: Boni | last post by:
Dear All, we have a big project with C# and MCPP mixed assemblies. Is MCPP still supported in VS2005? Do we have to change something in MCPP? With best regards, Boni
3
by: Pixel.to.life | last post by:
Hi, Gurus, I recently attempted to build a .Net forms application, that links with old style unmanaged C++ static libs. Of course I had to recompile the static lib projects to link properly...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
1
by: Kenneth Porter | last post by:
I have an unmanaged library that can accept an instance of an abstract class and call back into it. I'm writing a wrapper for this library. How do I wrap a managed callback in a class derived...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
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.