Can you provide libs for the mingw compiler

95 views
Skip to first unread message

Mohamed Eldib

unread,
Nov 17, 2009, 10:47:17 PM11/17/09
to ASMLibrary
Good day

if you kindly please provide, libs version for the mingw compiler,
because those are for ms compilers, and i am working with Qt which
gives me undefined reference when i am porting the project.

your answer is really appreciated

thanks for the great effort

regards

Mohamed Eldib

Yao Wei

unread,
Nov 19, 2009, 3:45:50 AM11/19/09
to asmli...@googlegroups.com, mohamed...@gmail.com
Please use the include file for version 4.0.
Regards
--
Yao Wei, P.R. China
Mobile: (+86) 138-1698-4972

Everything should be made as simple as possible, but not simpler.
asmlibrary_4.0(for cygwin).zip

Nenad Bulatovic

unread,
Aug 17, 2013, 8:33:03 AM8/17/13
to asmli...@googlegroups.com
Hello,
when I try to compile it with eclipse cdt & cygwin I get this error:

Building target: AsmLibrarySDK_FIT.exe
Invoking: Cygwin C++ Linker
g++ -L"C:\OpenCV246MinGW\x86\lib" -L"C:\asmlibraryFaceXpress" -o "AsmLibrarySDK_FIT.exe"  ./demo_fit.o  ./video_camera.o  ./vjfacedetect.o   -lopencv_calib3d246 -lopencv_contrib246 -lopencv_core246 -lopencv_features2d246 -lopencv_flann246 -lopencv_gpu246 -lopencv_highgui246 -lopencv_imgproc246 -lopencv_legacy246 -lopencv_ml246 -lopencv_nonfree246 -lopencv_objdetect246 -lopencv_photo246 -lopencv_stitching246 -lopencv_video246 -lopencv_videostab246 -lasmlibrary
./demo_fit.o: In function `main':
/cygdrive/c/Users/Nenad/eclipseCDT/opencv2cookbook/AsmLibrarySDK_FIT/Debug/../demo_fit.cpp:244: undefined reference to `InitShapeFromDetBox'
makefile:44: recipe for target `AsmLibrarySDK_FIT.exe' failed
/cygdrive/c/Users/Nenad/eclipseCDT/opencv2cookbook/AsmLibrarySDK_FIT/Debug/../demo_fit.cpp:255: undefined reference to `asmfitting::Fitting2(asm_shape*, int, _IplImage const*, int)'
collect2: error: ld returned 1 exit status
make: *** [AsmLibrarySDK_FIT.exe] Error 1

Can you please explain to me why is this happening?

Regards,
Nenad

Nenad Bulatovic

unread,
Aug 17, 2013, 8:35:47 AM8/17/13
to asmli...@googlegroups.com, mohamed...@gmail.com
Hi,

if I try to compile it with MinGW I get this error:

14:34:37 **** Rebuild of configuration Debug for project AsmLibrarySDK_FIT ****
Info: Internal Builder is used for build
g++ "-IC:\\OpenCV246PC\\build\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o video_camera.o "..\\video_camera.cpp" 
g++ "-IC:\\OpenCV246PC\\build\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o demo_fit.o "..\\demo_fit.cpp" 
g++ "-IC:\\OpenCV246PC\\build\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o vjfacedetect.o "..\\vjfacedetect.cpp" 
..\vjfacedetect.cpp: In function ‘bool detect_all_faces(asm_shape**, int&, const IplImage*)’:
..\vjfacedetect.cpp:85:11: warning: variable ‘pt1’ set but not used [-Wunused-but-set-variable]
..\vjfacedetect.cpp:85:16: warning: variable ‘pt2’ set but not used [-Wunused-but-set-variable]
g++ "-LC:\\OpenCV246MinGW\\x86\\lib" "-LC:\\asmlibraryFaceXpress" -o AsmLibrarySDK_FIT.exe vjfacedetect.o video_camera.o demo_fit.o -lopencv_calib3d246 -lopencv_contrib246 -lopencv_core246 -lopencv_features2d246 -lopencv_flann246 -lopencv_gpu246 -lopencv_highgui246 -lopencv_imgproc246 -lopencv_legacy246 -lopencv_ml246 -lopencv_nonfree246 -lopencv_objdetect246 -lopencv_photo246 -lopencv_stitching246 -lopencv_video246 -lopencv_videostab246 -lasmlibrary 
demo_fit.o: In function `main':
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:189: undefined reference to `_imp__InitShapeFromDetBox'
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:195: undefined reference to `_imp___ZN10asmfitting12ASMSeqSearchER9asm_shapePK9_IplImageibi'
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:244: undefined reference to `_imp__InitShapeFromDetBox'
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:255: undefined reference to `_imp___ZN10asmfitting8Fitting2EP9asm_shapeiPK9_IplImagei'
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:305: undefined reference to `_imp__InitShapeFromDetBox'
C:\Users\Nenad\eclipseCDT\opencv2cookbook\AsmLibrarySDK_FIT\Debug/../demo_fit.cpp:313: undefined reference to `_imp___ZN10asmfitting12ASMSeqSearchER9asm_shapePK9_IplImageibi'
collect2.exe: error: ld returned 1 exit status

How can  Iresolve this?


On Thursday, November 19, 2009 9:45:50 AM UTC+1, Yao Wei wrote:

Yao Wei

unread,
Aug 17, 2013, 8:50:43 AM8/17/13
to asmli...@googlegroups.com
just link like libasmlibrary.a not -lasmlibrary


--
 
---
You received this message because you are subscribed to the Google Groups "ASMLibrary" group.
To unsubscribe from this group and stop receiving emails from it, send an email to asmlibrary+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Nenad Bulatovic

unread,
Aug 17, 2013, 10:05:10 AM8/17/13
to asmli...@googlegroups.com
Thank you for your answer but I don't understand.

Here, I set up as library name "asmlibrary"

Here, I set up path for libraries:

And in the directory C:\asmlibraryFaceXpress
I have this three libraries: cygasmlibrary-4.dll, libasmlibrary.a, libasmlibrary.dll.a

Even if I set build configuration from Debug to Release I got the same:
16:02:49 **** Incremental Build of configuration Release for project AsmLibrarySDK_FIT ****
Info: Internal Builder is used for build
g++ "-LC:\\OpenCV246MinGW\\x86\\lib" "-LC:\\asmlibraryFaceXpress" -o AsmLibrarySDK_FIT.exe vjfacedetect.o video_camera.o demo_fit.o -lopencv_calib3d246 -lopencv_contrib246 -lopencv_core246 -lopencv_features2d246 -lopencv_flann246 -lopencv_gpu246 -lopencv_highgui246 -lopencv_imgproc246 -lopencv_legacy246 -lopencv_ml246 -lopencv_nonfree246 -lopencv_objdetect246 -lopencv_photo246 -lopencv_stitching246 -lopencv_video246 -lopencv_videostab246 -lasmlibrary 
demo_fit.o:demo_fit.cpp:(.text.startup+0x4c9): undefined reference to `_imp___ZN10asmfitting12ASMSeqSearchER9asm_shapePK9_IplImageibi'
demo_fit.o:demo_fit.cpp:(.text.startup+0x638): undefined reference to `_imp__InitShapeFromDetBox'
demo_fit.o:demo_fit.cpp:(.text.startup+0x21c): undefined reference to `_imp__InitShapeFromDetBox'
demo_fit.o:demo_fit.cpp:(.text.startup+0x286): undefined reference to `_imp___ZN10asmfitting8Fitting2EP9asm_shapeiPK9_IplImagei'
demo_fit.o:demo_fit.cpp:(.text.startup+0x442): undefined reference to `_imp___ZN10asmfitting12ASMSeqSearchER9asm_shapePK9_IplImageibi'
demo_fit.o:demo_fit.cpp:(.text.startup+0x58c): undefined reference to `_imp__InitShapeFromDetBox'
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: demo_fit.o: bad reloc address 0x0 in section `.ctors'
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status

It doesn't matter if I compile with gcc from Cygwin or MinGW (they are gcc 4.7.3 and 4.7.2 version)


What I am doing wrong?

Regards,
Nenad

Yao Wei

unread,
Aug 17, 2013, 8:19:50 PM8/17/13
to asmli...@googlegroups.com

Code like this g++ a.c -o test libasmlibrary.a -lopencv_library

Nenad Bulatovic

unread,
Aug 18, 2013, 9:03:23 AM8/18/13
to asmli...@googlegroups.com
Hello,

I am very sorry to btoher you again, but this just wont work. I even copied (cygasmlibrary-4.dll, libasmlibrary.a, libasmlibrary.dll.a) into both release and debug directory and tried to compile from command line with this:

g++ "-LC:\\OpenCV246MinGW\\x86\\lib" "-LC:\\asmlibraryFaceXpress" -o AsmLibrarySDK_FIT.exe vjfacedetect.o video_camera.o demo_fit.o libasmlibrary.a -lopencv_calib3d246 -lopencv_contrib246 -lopencv_core246 -lopencv_features2d246 -lopencv_flann246 -lopencv_gpu246 -lopencv_highgui246 -lopencv_imgproc246 -lopencv_legacy246 -lopencv_ml246 -lopencv_nonfree246 -lopencv_objdetect246 -lopencv_photo246 -lopencv_stitching246 -lopencv_video246 -lopencv_videostab246

But it won't work. I got the same error as described previously.
Reply all
Reply to author
Forward
0 new messages