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

Linking Visualc++ 6 dll with c++ .net

Hi,
I am currently having trouble with the following code sample:

#include "stdafx.h"
#include <iostream>
#include "DLL6.h"

void helloWorld(const std::string& pValue)
{
std::cout << pValue.c_str() << std::endl;
}

This is compiled using visual C++ v6.0 in a dll (Use of Multithreaded
runtime Dll - exceptions disabled - rtti enabled )

Then, I create the following executable with visual .net:

#include "stdafx.h"
#include "Dll6.h"

int main(int argc, char* argv[])
{
helloWorld(std::string("Hello world"));
return 0;
}
The program compiles and links properly but crashes in std::string

I've read in the msdn that the standard library has changed from VC6 to
VC7 .net. And I 've read compatibility issues stuff about STL and also
about the default runtime library.
So I ve tried to change the settings of the VC6 compiled dll in many
ways (enabling exceptions, /Nodefault ). I have also tried to change the
settings of the .net compiled main (forcing the use of old default
libraries msvcirt.lib ). Nothing worked.
I 'am stucked ..... :o(
If anybody has some tips.....
Thank you in advance,
Bye
Stephane

Jul 19 '05 #1
0 1476

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

Similar topics

1
by: Christian | last post by:
Hi all, I have an application with a GUI in Tcl/Tk (running on AIX /Linux) and I need to make it running (porting) in Windows 2000. I would like to have some suggestion about this. What IDE...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
1
by: Alberto Salvati | last post by:
Hi, list! I'm a delphi develeper. Using borland c#builder trial I've create an application mda without external tools (i.e. enterprise architet, rose...). This is "ECO MODEL". Now, I don't...
6
by: Larry | last post by:
After installing VisualC# Standard, DX9 will not install the debugger. Any other users of C# Standard have similar problems? PS: I ran the complete VStudio .net trial for 60 days and DX9...
8
by: akira2x3x | last post by:
Hello, I get this error while compiling with visualc++ and STL roguewave. With STL microsoft everything work fine. XXXData.cpp f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h(63) : error...
2
by: luca regini | last post by:
This example http://rafb.net/paste/results/YWurKV40.html doesn't seem to work correctly under visualc 7.0. Did anyone experienced the same problem? How did you solve it then? Thanks in...
2
by: Andrea Pisar | last post by:
I tried to call my chm file from VisualC#.Net. First I wrote a little program just to test it ( with Help.Showhelp(this,helpfile)), no problems in this case. Then I did the same in our actual...
4
by: kbhat | last post by:
I am looking at some Visual C++ code and I am amazed at the number of proprietary extensions to C++ that I am seeing. I even wonder if this is the same language! I understand the need to have a...
3
by: Allonii | last post by:
Hello! Im new to C++ but little used to java! Well my question is how you can connect to a database and then add, delete, etc trough a windows application. Im using visualC++ express...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.