473,405 Members | 2,160 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,405 software developers and data experts.

inline expansion

I am currently trying to wrap an old library (ImageMagick) in .NET, and am
having problems with inline expansions. I have recompiled the library in vc++
2005 OK. However, when I try to access any inline methods of the library
classes from my managed classes, the inlining does not seem to occur, and I
end up with a linker error 2001 - unresolved external. Is there a trick for
getting this to work. I have tried using Default inline (/Ob0) in the
library, and maximum expansion in my assembly (Ob2) - even tried turning
auto_inline off when compiling the library - still getting the linker message.

Ta

Mick
Dec 26 '06 #1
2 1806

"Mick O'Neill" <Mick O'*****@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.com...
>I am currently trying to wrap an old library (ImageMagick) in .NET, and am
having problems with inline expansions. I have recompiled the library in
vc++
2005 OK. However, when I try to access any inline methods of the library
classes from my managed classes, the inlining does not seem to occur, and
I
end up with a linker error 2001 - unresolved external. Is there a trick
for
getting this to work. I have tried using Default inline (/Ob0) in the
library, and maximum expansion in my assembly (Ob2) - even tried turning
auto_inline off when compiling the library - still getting the linker
message.
Usually in this scenario you have the native classes defined by the library,
with managed wrapper ref classes, compiled into a single assembly with
C++/CLI, and then a client in any .NET language. Which caller is giving the
error message, the ref class inside the same assembly, or the assembly
consumer (which could be C# or VB.NET as easily as C++/CLI)?
>
Ta

Mick

Dec 26 '06 #2
It is when I am compiling the wrapper assembly itself. The code is something
like this:

#include "Wrapped.h"

// Wrapped(param) constructor is inline in Wrapped.h
public ref class MyWrapper {
private:
Wrapped *pWrapped;
public:
MyWrapper(param p1) {
pWrapped = new Wrapped(p1);
}
};

Wrapped.lib is included in the project properties.
"Ben Voigt" wrote:
>
"Mick O'Neill" <Mick O'*****@discussions.microsoft.comwrote in message
news:C7**********************************@microsof t.com...
I am currently trying to wrap an old library (ImageMagick) in .NET, and am
having problems with inline expansions. I have recompiled the library in
vc++
2005 OK. However, when I try to access any inline methods of the library
classes from my managed classes, the inlining does not seem to occur, and
I
end up with a linker error 2001 - unresolved external. Is there a trick
for
getting this to work. I have tried using Default inline (/Ob0) in the
library, and maximum expansion in my assembly (Ob2) - even tried turning
auto_inline off when compiling the library - still getting the linker
message.

Usually in this scenario you have the native classes defined by the library,
with managed wrapper ref classes, compiled into a single assembly with
C++/CLI, and then a client in any .NET language. Which caller is giving the
error message, the ref class inside the same assembly, or the assembly
consumer (which could be C# or VB.NET as easily as C++/CLI)?

Ta

Mick


Dec 26 '06 #3

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

Similar topics

4
by: FLEB | last post by:
I like PHP for its excellent inline integration into standard HTML files, but I like Perl for its quick-moving syntax and simpler data-processing. To resolve this deep-seated inner turmoil (oh, the...
21
by: Rubén Campos | last post by:
I haven't found any previous message related to what I'm going to ask here, but accept my anticipated excuses if I'm wrong. I want to ask about the real usefulness of the 'inline' keyword. I've...
5
by: ganesh.gella | last post by:
Hi All, Wanted to make sure on this, I have some functions for which I am providing the definition inside the class definition. (As these are very small functions like get and set). Do i...
33
by: Robert Seacord | last post by:
When writing C99 code is a reasonable recommendation to use inline functions instead of macros? What sort of things is it still reasonable to do using macros? For example, is it reasonable to...
7
by: sam_cit | last post by:
Hi Everyone, I have a function declared as inline and i was wondering as to how it would be expanded by the compiler sample(int x) { if (x>0) sample(--x); printf("%d",x); }
5
by: Barry | last post by:
Hi, group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. //...
6
by: MiG | last post by:
Hello, I would like to know if including the body of a function in its class declaration results in the function being inlined. In other words, is the following code... template <typename...
15
by: Mahesh | last post by:
Hi, I need to know if stack frames are generated in case of a inline function execution or do they execute just like macros? if they execute like macros, then what is the need for having inline...
4
by: raashid bhatt | last post by:
hi by the definition of inline functions "In computer science, an inline function is a programming language construct used to suggest to a compiler that a particular function be subjected to...
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: 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...
0
jinu1996
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...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.