ふらっとC#,C♯,C#(初心者用) Part26at TECH
ふらっとC#,C♯,C#(初心者用) Part26 - 暇つぶし2ch558:デフォルトの名無しさん
08/04/05 14:10:40
>>554
C:\>type test.cpp
extern "C" __declspec(dllexport) int f() {
return 777;
}

C:\>type test.cs
using System;
using System.Runtime.InteropServices;
namespace Test {
class Test {
[DllImport("test", CallingConvention=CallingConvention.Cdecl)]
static extern int f();
static void Main() {
Console.WriteLine(f());
}
}
}

C:\>cl /LD /nologo test.cpp
test.cpp
ライブラリ test.lib とオブジェクト test.exp を作成中

C:\>csc /nologo test.cs

C:\>test
777


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch