[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
octave 3.2.2 build with libstdc++_s.a by GCC-4.4.0 (MinGW Official)
From: |
Tatsuro MATSUOKA |
Subject: |
octave 3.2.2 build with libstdc++_s.a by GCC-4.4.0 (MinGW Official) |
Date: |
Sun, 26 Jul 2009 08:50:13 +0900 (JST) |
Hello
I have tried to build octave 3.2.2 with libstdc++_s.a by GCC-4.4.0 (MinGW
Official) .
With very tricky way, I have got a successful result.
I hacked Makefile in liboctave and src to add -lstdc++_s flag at the end of
linker flag.
For octave.exe it went well
g++ -shared-libgcc -D_DLL -DPIC -Ic:/Programs/OctaveBuild/include
-Ic:/Programs/WinDevTools/include
-Ic:/Programs/GnuWin32/include -Ic:/progra~1/Pcre/include -I.
-I../../../octave-3.2.2/src -I..
-I../liboctave -I../src -I../libcruft/misc -I../../../octave-3.2.2
-I../../../octave-3.2.2/liboctave
-I../../../octave-3.2.2/src -I../../../octave-3.2.2/libcruft/misc
-DHAVE_CONFIG_H -mieee-fp
-IC:/Programs/WinDevTools/include/freetype2 -IC:/Programs/WinDevTools/include
-Wall -W -Wshadow
-Wold-style-cast -Wformat -O3 -fomit-frame-pointer \
-L.. -Lc:/Programs/OctaveBuild/lib -LC:/Programs/WinDevTools/lib
-Lc:/Programs/GnuWin32/lib -o
octave.exe \
main.o \
-L../liboctave -L../libcruft -L../src \
-loctinterp -loctave -lcruft -lglob \
-lumfpack -lamd -lcamd -lcolamd \
-lcholmod -lccolamd -lcxsparse -Lc:/Programs/OctaveBuild/lib -lblas.dll
-llapack.dll \
-lfftw3 -lfftw3f -lqrupdate -larpack -lftgl
-LC:/Programs/WinDevTools/lib -lfreetype -lopengl32
-lglu32 \
-lreadline -ltermcap -liberty -Lc:/Programs/OctaveBuild/lib
-lblas.dll -llapack.dll -lhdf5 -lz -lm
-luuid -lgfortran.dll -lgdi32 -lws2_32 -luser32 -lkernel32
-Lc:/Programs/OctaveBuild/lib
-LC:/Programs/WinDevTools/lib -Lc:/Programs/GnuWin32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0
-Lc:/programs/mingw/bin/../lib/gcc
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -lhdf5 -lz -lm -luuid
-lgfortran.dll
-lgfortranbegin -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32
-lkernel32 -ladvapi32
-lshell32 -lstdc++_s
However, for liboctave.dll, liboptinterp.dll and *.oct file, the above did not
goes well,
g++ alway add -lstdc++ and this caused multiple definition error.
So I first build them with without -lstdc++_s and then eleteted *.dll and oct
files.
And
make -i &> make.log
awk '{if($1=="g\+\+") print $0}' > tmp.text
to get
gcc -shared-libgcc -shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-runtime-pseudo-reloc -o betainc.oct betainc.o -L../libcruft
-lcruft -L../liboctave
-loctave -L. -loctinterp -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd
-lcxsparse
-Lc:/Programs/OctaveBuild/lib -lblas.dll -llapack.dll -lfftw3 -lfftw3f
-lqrupdate -larpack -lreadline
-ltermcap -liberty -Lc:/Programs/OctaveBuild/lib -lblas.dll -llapack.dll -lhdf5
-lz -lm -luuid
-lgfortran.dll -lgdi32 -lws2_32 -luser32 -lkernel32
-Lc:/Programs/OctaveBuild/lib
-LC:/Programs/WinDevTools/lib -Lc:/Programs/GnuWin32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0
-Lc:/programs/mingw/bin/../lib/gcc
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/lib
-Lc:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0/../../.. -lhdf5 -lz -lm -luuid
-lgfortran.dll
-lgfortranbegin -lgfortran -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32
-lkernel32 -ladvapi32
-lshell32
:
:
I replace all g++ by gcc and add -lstdc++_s -lsupc++ at the last of linker
flag by text editor.
And then build dll files and oct files. The size of oct flies reduced by about
300 kbytes.
The finally I have tested make check.
http://www.nabble.com/Re:-Octave-Version-3.2.2-Released-p24652801.html
However my way is too tricky.
Does anyone tried to build octave by GCC-4.4.0-MinGW official with shared
libstdc++ ?
Regards
Tatsuro
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/
- octave 3.2.2 build with libstdc++_s.a by GCC-4.4.0 (MinGW Official),
Tatsuro MATSUOKA <=