473,769 Members | 6,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

library and pure

I am building a control library in C++/CLI. My project links with a
native library and am getting an error that the library cannot work
with pure:

dxerr.lib(dxerr .obj) : fatal error LNK1313: ijw/native module
detected; cannot link with pure modules

I am fine switching to CLR mode, but I have a question. If I build
the control library DLL in CLR mode, will it still integrate
seamlessly into C#/VB projects? Or will I have to change compiler
switches in the C#/VB projects as well?

Sep 18 '07 #1
3 5392

<dr************ *@hotmail.comwr ote in message
news:11******** **************@ w3g2000hsg.goog legroups.com...
>I am building a control library in C++/CLI. My project links with a
native library and am getting an error that the library cannot work
with pure:

dxerr.lib(dxerr .obj) : fatal error LNK1313: ijw/native module
detected; cannot link with pure modules

I am fine switching to CLR mode, but I have a question. If I build
the control library DLL in CLR mode, will it still integrate
seamlessly into C#/VB projects? Or will I have to change compiler
switches in the C#/VB projects as well?

It will work just fine. However, if you want to debug through the C++/CLI
code, you'll have to set "Enable native debugging" in the main application
(probably C#/VB).
Sep 20 '07 #2
dr************* @hotmail.com wrote:
I am building a control library in C++/CLI. My project links with a
native library and am getting an error that the library cannot work
with pure:

dxerr.lib(dxerr .obj) : fatal error LNK1313: ijw/native module
detected; cannot link with pure modules

I am fine switching to CLR mode, but I have a question. If I build
the control library DLL in CLR mode, will it still integrate
seamlessly into C#/VB projects? Or will I have to change compiler
switches in the C#/VB projects as well?
As Ben already replied, it'll work fine with C#/VB - the language of the
host application is not an issue.

The important difference between /clr, /clr:safe and /clr:pure is the amount
of trust required to run the resulting program. /clr:safe requires the
least trust, as the resulting assembly is pure and verifiable. /clr:pure
requires more trust because the assembly is not verifiable, and /clr
requires still more because the assembly contains mixed managed/native code.

-cd
Sep 20 '07 #3

"Carl Daniel [VC++ MVP]" <cp************ *************** **@mvps.org.nos pam>
wrote in message news:On******** **********@TK2M SFTNGP04.phx.gb l...
dr************* @hotmail.com wrote:
>I am building a control library in C++/CLI. My project links with a
native library and am getting an error that the library cannot work
with pure:

dxerr.lib(dxer r.obj) : fatal error LNK1313: ijw/native module
detected; cannot link with pure modules

I am fine switching to CLR mode, but I have a question. If I build
the control library DLL in CLR mode, will it still integrate
seamlessly into C#/VB projects? Or will I have to change compiler
switches in the C#/VB projects as well?

As Ben already replied, it'll work fine with C#/VB - the language of the
host application is not an issue.

The important difference between /clr, /clr:safe and /clr:pure is the
amount of trust required to run the resulting program. /clr:safe requires
the least trust, as the resulting assembly is pure and verifiable.
/clr:pure requires more trust because the assembly is not verifiable, and
/clr requires still more because the assembly contains mixed
managed/native code.
I think /clr and /clr:pure are equivalent trust-wise: both require
FullTrust. But /clr:pure is processor-independent, that is to say that it
can be JITted to 32-bit or 64-bit as needed, while mixed-mode /clr
assemblies have bitness determined by the native code.

Also /clr:pure executables can be loaded as libraries, while mixed-mode
executables have the relocation segments stripped and can only be the main
process.
Sep 24 '07 #4

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

Similar topics

1
3473
by: Frank Taylor | last post by:
I am writing a simple viewer for a Palm Pilot database to run on my desktop machine. I have written a simple parser for PDB files, but it is not complete (does not deal with categories). Has anyone written a free and complete PDB library. Read-only would be fine as my viewer does not need to update the file. If not, I'll probably complete my current code and publish it. Many thanks,
1
2289
by: Mark McEahern | last post by:
I just wrote a very simple wrapper for the PayFlow Pro SDK (see below). A friend of mine did this before, but I didn't have access to his source, so I took it as a learning opportunity for me to write a C wrapper. I did a little searching to see whether anyone had done anything like this for Python. I didn't find anything. I did find that PHP comes with an extension for PayFlow Pro that you can compile into the language:
4
4211
by: listigerBiber | last post by:
Hello, i want to extend a program of mine with a plugin architecture. I can load and use the shared libs which are implementations of a abstract base class without any problems. But what i need is a bi-directional interface, the plugins have to acess objects of the main programm (pointers to them are passed at plugin initialisation). This works too - but only if i include the header and .cpp files of these api objects into every plugin...
2
2952
by: Petri Savolainen | last post by:
Hello, has anyone seen such a beast? I tried googling, PyPI, Parnassus etc. but could not find any pure-python code nor extensions to interface with any of the existing implementations. I am thinking about taking the Ruby code I found at http://www.zweknu.org/technical/index.rhtml?s=p%7c15
5
3072
by: Gerhard Menzl | last post by:
When creating a Managed C++ DLL using the Visual Studio 7.1 Solution Explorer (by selecting Add New Project and then either choosing Class Library (.NET) or Windows Control Library (.NET)), the IDE sets the /MT(d) compiler switch (statically linked multithreaded C runtime library) by default. This is fine with me, as it relieves me from having to redistribute MSVCR71(D).DLL with my application. However, as soon as a single runtime...
4
2397
by: Ray Tayek | last post by:
hi, i am teaching a class using visual studio 2003 in the labs at school and trying to get some pure c++ into a dll so i can sic nunit on it. trying to put the code below into a .net class library gets unresolved externs: pure error LNK2020: unresolved token (0A000006) _CxxThrowException pure error LNK2020: unresolved token (0A000015) delete pure fatal error LNK1120: 2 unresolved externals
0
4093
by: JosAH | last post by:
Greetings, the last two article parts described the design and implementation of the text Processor which spoonfeeds paragraphs of text to the LibraryBuilder. The latter object organizes, cleans up and stores the text being fed to it. Finally the LibrayBuilder is able to produce a Library which is the topic of this part of the article. Introduction
3
4466
by: Luq | last post by:
I am confused.... My plan is to write a program for some scientific computing in c#, because I heard that c# codes are much better and easier to write and manage. But the problem is that I have to use some c++ library, for example the GSL (GNU Scientific library) for some numerical functions and the library for HDF5 data format. They are xxxx.a files under Linux. So how can I access these libraries from the c# programs? Is that possible...
2
2707
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream in("myfile.txt"); float value; in >value; //The crash happens here in the getloc() function The above code is actually from a library built in Debug mode that is linked into the Release build of the executable. Does anyone have any
0
9590
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9424
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8879
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.