Error: linking qt_example.cpp with MinGW and VS2008

229 views
Skip to first unread message

d...@itec-home.info

unread,
Feb 23, 2012, 6:51:40 PM2/23/12
to MathGL
Hi,

I tried to compile the MathGL qt_example-cpp with MathGL-version
1.11.2

I used qtcreator with VS2008 option:

- Qt4.7.3 for Desktop - MSVSC2008(QtDSK) Debug

and later

- Qt4.7.3 for Desktop - MinGW 4.4(QtDSK) Debug


Both trials of compliling failed with the same error:

LINK (used path) lib no such file


The result using using VS2008 is:
LINK : fatal error LNK1181: Eingabedatei "(used path)/lib.obj" cannot
be opened


I think, I have no luck with this SW.

Regards
Walter

mathgl....@gmail.com

unread,
Feb 24, 2012, 3:04:23 AM2/24/12
to mat...@googlegroups.com
Dear Walter,

> I tried to compile the MathGL qt_example-cpp with MathGL-version
> 1.11.2
>
> I used qtcreator with VS2008 option:
>
>  - Qt4.7.3 for Desktop - MSVSC2008(QtDSK) Debug

This will not work due to incompatible formats of C++ function names
in MinGW and MSVS. You only can use pure C functions and wrapper class
(from <mgl/mgl_w.h>). No widget will not work in v.1.*. See
http://mathgl.sourceforge.net/mathgl_en/mathgl_en_6.html#FAQ

>  and later
>
>  - Qt4.7.3 for Desktop - MinGW 4.4(QtDSK) Debug
>
>
>  Both trials of compliling failed with the same error:
>
>  LINK (used path) lib no such file
>
>
>  The result using using VS2008 is:
>  LINK : fatal error LNK1181: Eingabedatei "(used path)/lib.obj" cannot be opened

It seems as you specify folder name as the library name. Valid library
files are *.a for MinGW.

For MSVS you have to produce valid *.lib files from *.dll.

--
All the best,
Alexey Balakin

Walter Kaufmann

unread,
Feb 24, 2012, 7:57:23 AM2/24/12
to mat...@googlegroups.com

Dear Alexey,

we are forced into our private project with VS2008 and Qt Windows7 use.
We use mathgl version 1.11.2.
For 3 days we are working (Walter & Mike) it to generate the binaries from
the source code.
Unfortunately, without success and we are complete frustrated :-(.

Please send us a link to download any of us needed dlls and libs (*. Lib *.
Dll).

How is the wrapper class #include <mgl/mgl_w.h> to use?

Please help us as soon as possible,

Best regards and thanks a lot
Walter & Mike

d...@itec-home.info

unread,
Feb 24, 2012, 9:57:05 AM2/24/12
to MathGL
Dear Alexey,

how can I produce valid *.lib files from *.dll, as you mentioned
below?

Walter & Mike



On 24 Feb., 09:04, "mathgl.abala...@gmail.com"
<mathgl.abala...@gmail.com> wrote:
> Dear Walter,
>
> > I tried to compile the MathGL qt_example-cpp with MathGL-version
> > 1.11.2
>
> > I used qtcreator with VS2008 option:
>
> >  - Qt4.7.3 for Desktop - MSVSC2008(QtDSK) Debug
>
> This will not work due to incompatible formats of C++ function names
> in MinGW and MSVS. You only can use pure C functions and wrapper class
> (from <mgl/mgl_w.h>). No widget will not work in v.1.*. Seehttp://mathgl.sourceforge.net/mathgl_en/mathgl_en_6.html#FAQ

Alexey Balakin

unread,
Feb 24, 2012, 10:03:04 AM2/24/12
to MathGL
Dear Walter,

> Please send us a link to download any of us needed dlls and libs (*. Lib *.
> Dll).

You can download all *.dll from http://gnuwin32.sf.net/ or as all in a
single file http://downloads.sourceforge.net/udav/udav-0.7.1.2-win32.zip

As I wrote before -- I don't know how *.lib can be produced from *.dll
in MS VS2008. Try this link https://www.google.com/search?channel=fs&q=lib+from+dll+in+VS2008

> How is the wrapper class #include <mgl/mgl_w.h> to use?

As any other class. If you are asking about documentation then look
http://mathgl.sourceforge.net/mathgl_en/mathgl_en_17.html#MathGL-core
. It is another variant of definition for class mglGraph. All
functions marked as "(C++, Python)" are accessible in <mgl/mgl_w.h>.
Note, that any widget classes (like, QMathGL, Fl_MathGL and so on) are
not included in <mgl/mgl_w.h> since different compilers use different
naming of C++ functions.

Alexey

Walter Kaufmann

unread,
Feb 24, 2012, 1:09:50 PM2/24/12
to mat...@googlegroups.com

Dear Alexey,

now we are three guys and we are thinking about working under influence of
several drinks ... :-)

In the attachment we describe the Error situation.

Thanks lot ...

Walter

QtCreator_qt_example_002.pdf

mathgl....@gmail.com

unread,
Feb 25, 2012, 12:58:01 AM2/25/12
to mat...@googlegroups.com
Dear Walter,

MathGL v.1.11.2 was compiled by MinGW gcc v.4.5.2 with Qt 4.7.2. From
yours log (in PDF) I can suppose (unfortunately I don't understand
German) that it require newer libstdc++ (mingwm10.dll). So, you may
need to upgrade to the newest MinGW version or try to use static
MathGL libraries (i.e. libmgl.a, libmgl-qt.a). Note, that usage of
both static (libmgl.a) and dynamic (libmgl.dll.a) libraries can cause
a problem too.

--
All the best,
Alexey Balakin

2012/2/24 Walter Kaufmann <d...@itec-home.info>:

d...@itec-home.info

unread,
Feb 25, 2012, 2:11:53 PM2/25/12
to MathGL
Dear Alexey,

we are happy, because now, we can compile the Example: qt_example,
after downloading MinGW version 4.6.1.

Thanks a lot for support!!!


Next step:
I will compile the other examples

and then I want to build the libs/binary from source.

Thanks a lot for your patience

I am happy ..
Walter


On 25 Feb., 06:58, "mathgl.abala...@gmail.com"

Walter Kaufmann

unread,
Feb 25, 2012, 7:26:04 PM2/25/12
to mat...@googlegroups.com
Dear Alexey,

First: I could compile and generate qt_examle. Fine! I am happy!!!


Then I tried to build MathGl bottom up from source.
Result: error(s) occurred

Complete description in attachment.
If there is time, please give me a hint that I can go on.
I have no idea, what the reason is for these errors is
("zlib.h not found", but it is there in the expected folder,
I checked).

Thanks a lot
Walter

Problem_Build_MathGL_1.11.2_WK_001.pdf
build_process_mingw32-make_log.txt
Makefile
cmake_install.cmake
CMakeCache.txt

Alexey Balakin

unread,
Feb 25, 2012, 8:46:46 PM2/25/12
to mat...@googlegroups.com
Dear Walter,

you are good tester! I never can imagine that somebody will use zlib
from sources and will not use PNG and/or GSL. So, I hope that I've fixed
this in SVN. Please check it.

Alexey

В Вс., 26/02/2012 в 01:26 +0100, Walter Kaufmann пишет:

Walter Kaufmann

unread,
Feb 26, 2012, 5:09:56 AM2/26/12
to mat...@googlegroups.com
Dear Alexey,

Thanks for quick reply, really.

State: zlib - problem seems to solved ...

But a new error occurred in mgl_export.cpp

Complete description in attachment.
Also, if there is time, please give me a hint that I can go on.
I can not thank you enough for your support, really.


Thanks a lot
Walter

Problem_Build_MathGL_1.11.2_WK_002.pdf
build_process_mingw32-make_log_WK_002.txt
Makefile
cmake_install.cmake
CMakeCache.txt

Alexey Balakin

unread,
Feb 27, 2012, 11:14:43 AM2/27/12
to mat...@googlegroups.com
Dear Walter,

it seems that you don't install libpng. But by some way you can bypass
cmake configuration. How??? This strict limitation in cmake variant.
Formally, you can switch off PNG support by defining NO_PNG. But
question still present -- how you did that cmake generate makefile while
you have no PNG?

Alexey

В Вс., 26/02/2012 в 11:09 +0100, Walter Kaufmann пишет:

Walter Kaufmann

unread,
Feb 27, 2012, 3:24:13 PM2/27/12
to mat...@googlegroups.com
Hi Alexey,

I am so happy, I think I found the reason of producing the damn errors in
build process.


Solution:

1. use latest MinGW 4.6.1
2. throw away the official CMake Release 2.8.7
3. take latest CMake Beta -Release:
cmake-2.8.7.20120117-g95dd0-win32-x86.exe

Result:
No error occurs, but I am not to guy, who has the experience to say,
that everything is complete OK.

Therefore, as usual, I send all recent files in the attachment.
Please give me an answer.

Thank you very, for supporting me :-)
Walter

-----Ursprüngliche Nachricht-----
Von: mat...@googlegroups.com [mailto:mat...@googlegroups.com] Im Auftrag von
Alexey Balakin
Gesendet: Montag, 27. Februar 2012 17:15
An: mat...@googlegroups.com
Betreff: Re: AW: [ MathGL ] Build MathGL 1.11.2 from source

Problem_Build_MathGL_1.11.2_WK_003.pdf
build_process_mingw32-make_log_WK_003_Ok_Please_Check_it.txt
CMakeLists.txt

Walter Kaufmann

unread,
Feb 27, 2012, 3:47:03 PM2/27/12
to mat...@googlegroups.com
Sorry Alexey,

the build process seems to be ok, but some problems with the use of MinGW
occured.
The build process needs the latest MinGW version, but some parts will have
older versions of MingW, Is this possible?

_ZNSt8_detail15_List_node_base7_M_hookEPS0_ was not found in libstc++-6.dll

Thanks a lot
Walter

-----Ursprüngliche Nachricht-----
Von: mat...@googlegroups.com [mailto:mat...@googlegroups.com] Im Auftrag von

Walter Kaufmann
Gesendet: Montag, 27. Februar 2012 21:24
An: mat...@googlegroups.com
Betreff: [ MathGL ] Build MathGL 1.11.2 from source

Reply all
Reply to author
Forward
0 new messages