Click here to Skip to main content
15,919,434 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: array of strings Pin
John R. Shaw22-Apr-06 19:51
John R. Shaw22-Apr-06 19:51 
GeneralRe: array of strings Pin
2bee 23-Apr-06 8:06
2bee 23-Apr-06 8:06 
GeneralRe: array of strings Pin
John R. Shaw23-Apr-06 11:28
John R. Shaw23-Apr-06 11:28 
QuestionCString to System::String + MFC Q Pin
eladbo19-Apr-06 22:34
eladbo19-Apr-06 22:34 
AnswerRe: CString to System::String + MFC Q Pin
ariaci21-Apr-06 2:45
ariaci21-Apr-06 2:45 
AnswerRe: CString to System::String + MFC Q Pin
Maksim Libenson22-Apr-06 2:14
Maksim Libenson22-Apr-06 2:14 
AnswerRe: CString to System::String + MFC Q Pin
eladbo22-Apr-06 20:35
eladbo22-Apr-06 20:35 
Questionbuilding a dll Pin
Dan Neely19-Apr-06 8:35
Dan Neely19-Apr-06 8:35 
I'm trying to build a dll with the code in the article linked below for use in an otherwise C# (NET1.1) based project. The article itself only includes the class itself, and not any of the packaging needed to run. I tried creating a managed dll, and then just pasting the class data into the cpp/h files. I quickly ran into problems first with it not finding .net types, and then once I added those I started getting linker errors, and quickly got stuck since I haven't done anything c++ related in a long time. I assume I'm missing at least one include statement, but don't know which one.

The only change I've made to the code linked below was to pull the kernel32 stuff back into the main namespace.

http://www.codeproject.com/managedcpp/howtocomport.asp

the errors I'm getting from the linker at the moment are:
SerialPort error LNK2020: unresolved token (0A000025) _CxxThrowException
SerialPort error LNK2020: unresolved token (0A000027) delete





What I have at the moment is below:

SerialPort.h
// SerialPort.h

#pragma once

using namespace System;
using namespace System::IO;
using namespace System::Runtime::InteropServices;
using namespace std;


#ifndef NULL
#define NULL 0
#endif

namespace SerialPort
{
//class header, etc here
}


SerialPort.cpp
// This is the main DLL file.

#include "stdafx.h"

#include "SerialPort.h"

namespace SerialPort
{
//class impementation
}


stdafx.h
#pragma once
#include<new>
#include<iostream>

QuestionEnvironment variable TEMP Pin
QuaKx19-Apr-06 3:14
QuaKx19-Apr-06 3:14 
AnswerRe: Environment variable TEMP Pin
toxcct19-Apr-06 4:01
toxcct19-Apr-06 4:01 
QuestionLAN Pin
hacker8818-Apr-06 12:06
hacker8818-Apr-06 12:06 
JokeRe: LAN Pin
toxcct18-Apr-06 21:48
toxcct18-Apr-06 21:48 
GeneralRe: LAN Pin
Cedric Moonen19-Apr-06 1:35
Cedric Moonen19-Apr-06 1:35 
JokeRe: LAN Pin
Michał Zalewski5-May-06 7:15
Michał Zalewski5-May-06 7:15 
Questiontftp library Pin
madcatpride18-Apr-06 3:26
madcatpride18-Apr-06 3:26 
AnswerRe: tftp library Pin
Ed.Poore20-Apr-06 3:06
Ed.Poore20-Apr-06 3:06 
GeneralRe: tftp library Pin
madcatpride24-Apr-06 1:21
madcatpride24-Apr-06 1:21 
QuestionMixed DLL and Programs. Pin
DWyvern17-Apr-06 8:21
DWyvern17-Apr-06 8:21 
QuestionSimple File Server Pin
Bekham16-Apr-06 23:13
Bekham16-Apr-06 23:13 
AnswerRe: Simple File Server Pin
George L. Jackson17-Apr-06 2:58
George L. Jackson17-Apr-06 2:58 
AnswerRe: Simple File Server Pin
Prakash Nadar17-Apr-06 5:10
Prakash Nadar17-Apr-06 5:10 
GeneralRe: Simple File Server Pin
George L. Jackson17-Apr-06 14:18
George L. Jackson17-Apr-06 14:18 
JokeRe: Simple File Server Pin
Michał Zalewski5-May-06 7:18
Michał Zalewski5-May-06 7:18 
GeneralRe: Simple File Server Pin
Prakash Nadar5-May-06 15:19
Prakash Nadar5-May-06 15:19 
QuestionBorlad C++ Pin
Zantabri16-Apr-06 11:25
Zantabri16-Apr-06 11:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.