PHP Code:
k25@xg25 /cygdrive/c
$ g++ -O2 -c -o 1.o 1.cpp
k25@xg25 /cygdrive/c
$ g++ -fPIC -shared -o 1.dll 1.o
well I just can't resemble your problem here... the above thing runs well and no error. Here's my 1.cpp:
PHP Code:
#include <iostream>
using namespace std;
__declspec(dllexport) int test1()
{
cout << "test1" << endl;
}