|
From: Georg F. <fu...@is...> - 2000-12-04 19:49:15
|
After unzipping "libbfd-2.10.91-20001204.zip" in a directory tree containing all
the files of the new alpha-release and replacing the files of
"libbfd-2.10.91-20001111.zip"
I got the following error message:
gcc -shared -Wl,--out-implib,libcdll.a \
-o cdll.dll cdll.o
E:\Creat\MinGw\Bin\..\lib\gcc-lib\mingw32\2.95.2\..\..\..\..\mingw32\bin\ld.exe:
PE operations on non PE file.
Here the source code:
// Author: M. Khan
// Modified by Georg Fusz
//
// changed: the 'DLLIMPORT' are erased
#include <stdio.h>
#include "cdll.h"
int
dll_int_square (int i)
{
return i * i;
}
double
dll_double_square (double d)
{
return d * d;
}
float
dll_float_square (float f)
{
return f * f;
}
int
dll_global_int_var = 99;
void
dll_set_global_int_var (int new_value)
{
dll_global_int_var = new_value;
}
int
dll_get_global_int_var ()
{
return dll_global_int_var;
}
--
Georg Fusz
Technische Universitaet Berlin, Germany
Fon:
Uni.: +49 30 314 26 884
privat: +49 30 815 30 32
Handy: +49 173 20 10 696
Homepage: http://www.cadlab.tu-berlin.de/~fusz/
|