ふらっとC#,C♯,C#(初心者用) Part26
at TECH
558:デフォルトの名無しさん
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
4332日前に更新/161 KB
担当:undef