|
Compiling CBuild on MinGW32 |
Biznaga
Member #3,180
January 2003
|
Can CBuild (from APEG 1.2.1) be compiled on MinGW? I tried both the batch file and manual installation (using MSYS) but I got the following linker error message: cbuild.c: undefined reference to `mkstemp' What am I missing? $ gcc -v Reading specs from c:/sdk/mingw/3.1/bin/../lib/gcc-lib/mingw32/3.2.3/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c++,f77,objc --disable-win32-registry --disable-shared --enable-sjlj-exceptions Thread model: win32 gcc version 3.2.3 (mingw special 20030504-1)
|
Kitty Cat
Member #2,815
October 2002
|
It seems neither Windows nor MinGW have mkstemp. Could you try the attached version? It should work, hopefully. If it does, I'll update the archives. EDIT: -- |
Arthur Kalliokoski
Second in Command
February 2005
|
Mingw has tmpnam(). Maybe you could substitute and strcat the result? They all watch too much MSNBC... they get ideas. |
Kitty Cat
Member #2,815
October 2002
|
I switched to tmpfile() + fileno(), which is an all-around cleaner solution to what I needed. Windows seems to have it (even though MSVC has it deprecated in favor of tmpfile_s, and I need to define fileno to _fileno ). -- |
Biznaga
Member #3,180
January 2003
|
Thanks, Kitty Cat! It compiled fine. I even compiled APEG with it. |
|