This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with gnumex or cygwin/mingw setup install ?


Hi,

I'm newbies in the world of cygwin et Cie.
I want build mex file within matlab (Version 5.2, OS : win2k).
Code are C or Fortran. I test borland 5.5 compiler to build dll and it work fine with yprime.c and my C source code.


After reading article from http://www.mrc-cbu.cam.ac.uk/Imaging/Common/gnumex20.shtml about ''Compiling Matlab mex files with gcc for Windows'', i try to compile yprime.c with gcc. Unix emulation come from Mingw and Cygwin.
I set up path (dos and matlab), environnement and build mexopts.bat from gnumex with mingw gcc or cygwin gcc
But, I get an precompile file yprime.o and compile fails without more information.
I test cygwin gcc, issue is fatal too.


I make some change in mexopts.bat, look forum, compile in Dos and after in bash shell, test gnumex 1.08 and 1.09 but i don't understand what is wrong : setting, flag, path ...?

Could you help me ?
Many thanks. Ciao.

Jerôme

---------------------
M E X O P T S . B A T
---------------------
@echo off
rem C:\MATLAB\BIN\mexopts.bat
rem Generated by gnumex.m script in c:\gnumex
rem gnumex version: 1.08
rem Compile and link options used for building MEX etc files with
rem the Mingw/Cygwin tools. Options here are:
rem Mingw compile / link
rem Mex file creation
rem Standard (safe) linking to temporary libraries
rem Language C / C++
rem Matlab version 5.2
rem
set MATLAB=C:\MATLAB
set GM_PERLPATH=C:\MATLAB\bin\perl.exe
set GM_UTIL_PATH=c:\gnumex
set PATH=c:\Mingw\bin;%PATH%
rem
rem Added libraries for linking
set GM_ADD_LIBS=-lmingwex
rem
rem Type of file to compile (mex or engine)
set GM_MEXTYPE=mex
rem
rem Language for compilation
set GM_MEXLANG=c
rem
rem def files to be converted to libs
set GM_DEFS2LINK=matlab.def;libmat.def;libmatlb.def;
rem
rem dlltool command line
set GM_DLLTOOL=c:\gnumex\mexdlltool -E --as c:\Mingw\bin\as.exe
rem
rem compiler options; add compiler flags to compflags as desired
set NAME_OBJECT=-o
set COMPILER=gcc
set COMPFLAGS=-v -c -DMATLAB_MEX_FILE
set OPTIMFLAGS=-O3 -mcpu=pentium -malign-double -fno-exceptions
set DEBUGFLAGS=-g
set CPPCOMPFLAGS=%COMPFLAGS% -x c++
set CPPOPTIMFLAGS=%OPTIMFLAGS%
set CPPDEBUGFLAGS=%DEBUGFLAGS%
rem
rem NB Library creation commands occur in linker scripts
rem
rem Linker parameters
set LINKER=%GM_PERLPATH% %GM_UTIL_PATH%\linkmex.pl
set LINKFLAGS=
set CPPLINKFLAGS= --driver-name c++
set LINKOPTIMFLAGS=-s
set LINKDEBUGFLAGS=-g
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=-o %OUTDIR%%MEX_NAME%.dll
rem
rem Resource compiler parameters
set RC_COMPILER=%GM_PERLPATH% %GM_UTIL_PATH%\rccompile.pl -o %OUTDIR%mexversion.res
set RC_LINKER=


-----------------------------------------------------------
M E X C O M P I L E I S S U E F R O M M A T L A B (same issue from bash with mex.bat command)
-----------------------------------------------------------
» mex -v -f mexopts.bat c:\matlab\bin\yprime.o yprime.c
This is mex, (c) 1996 - 1998 The MathWorks, Inc.



-> Options file specified on command line
----------------------------------------------------------------
-> Options file = mexopts.bat
MATLAB = C:\MATLAB
-> COMPILER = gcc
-> Compiler flags:
COMPFLAGS = -v -c -DMATLAB_MEX_FILE OPTIMFLAGS = -O3 -mcpu=pentium -malign-double -fno-exceptions
DEBUGFLAGS = -g
arguments = -> Pre-linking commands = -> LINKER = C:\MATLAB\bin\perl.exe c:\gnumex\linkmex.pl
-> Link directives:
LINKFLAGS = Name directive = -o yprime.dll
File link directive = Lib. link directive = -> Resource Compiler = C:\MATLAB\bin\perl.exe c:\gnumex\rccompile.pl -o mexversion.res
-> Resource Linker = ----------------------------------------------------------------


--> gcc -v -c -DMATLAB_MEX_FILE -IC:\MATLAB\extern\include -IC:\MATLAB\simulink\include -O3 -mcpu=pentium -malign-double -fno-exceptions yprime.c

Reading specs from c:/Mingw/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)
c:\Mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\cc1.exe -lang-c -v -IC:\MATLAB\extern\include -IC:\MATLAB\simulink\include -iprefix c:\Mingw\bin/../lib/gcc-lib/mingw32/3.2.3/ -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D_WIN32 -D__WIN32 -D__WIN32__ -DWIN32 -D__MINGW32__ -D__MSVCRT__ -DWINNT -D_X86_=1 -D_WIN32 -D__WIN32 -D__WIN32__ -D__WIN32__ -D__MINGW32__ -D__MSVCRT__ -D__WINNT__ -D_X86_=1 -D__WIN32 -D__WINNT -Asystem=winnt -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__fastcall=__attribute__((__fastcall__)) -D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D_fastcall=__attribute__((__fastcall__)) -D__declspec(x)=__attribute__((x)) -DMATLAB_MEX_FILE yprime.c -quiet -dumpbase yprime.c -mcpu=pentium -malign-double -O3 -version -fno-exceptions -o C:\DOCUME~1\LEFEVRE\LOCALS~1\Temp/ccWsaaaa.s
GNU CPP version 3.2.3 (mingw special 20030504-1) (cpplib) (80386, BSD syntax)
GNU C version 3.2.3 (mingw special 20030504-1) (mingw32)
compiled by GNU C version 3.2.3 (mingw special).
ignoring nonexistent directory "c:/Mingw/mingw32/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/usr/local/mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
C:/MATLAB/extern/include
C:/MATLAB/simulink/include
c:/Mingw/include
c:/Mingw/lib/gcc-lib/mingw32/3.2.3/include
/mingw/include
/mingw/include
/mingw/lib/gcc-lib/mingw32/3.2.3/include
End of search list.
c:\Mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\as.exe --traditional-format -o yprime.o C:\DOCUME~1\LEFEVRE\LOCALS~1\Temp/ccWsaaaa.s


C:\MATLAB\BIN\MEX.BAT: Compile of 'yprime.c' failed.





--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]