undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd

KarlBlau
Hi,

I have problems compiling a program that uses VTK-5.0 to MS Windows.
I use makefiles, MSYS and MinGW as compiler.



At linking time I get the following messages:

undefined reference to `_imp___ZN9vtkCamera9SetViewUpEddd´

and ot more like this

When I enter

nm vtkRendering.lib I get

?SetViewUp@vtkCamera@@QAEXNNN@Z
___imp_?SetViewUp@vtkCamera@@QAEXNNN@Z

Does this look ok?


When I enter the same on my Linux machine, I get different hits.





General Question:
What are the correct libraries for Windows? *.lib? *.dll?
And what do I have to enter in the makefile: -lvtkCommon or -vtkCommon
or -vtkCommon.dll or vtkCommon.lib



Thanks, MB
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd

Xiaofeng Z
Looks like you're linking to the wrong library.

xz
http://www/xzing.org

----- Original Message -----
From: "Martin Baumann" <[hidden email]>
To: <[hidden email]>
Sent: Monday, February 06, 2006 11:05 AM
Subject: [vtkusers] undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd


> Hi,
>
> I have problems compiling a program that uses VTK-5.0 to MS Windows.
> I use makefiles, MSYS and MinGW as compiler.
>
>
>
> At linking time I get the following messages:
>
> undefined reference to `_imp___ZN9vtkCamera9SetViewUpEddd´
>
> and ot more like this
>
> When I enter
>
> nm vtkRendering.lib I get
>
> ?SetViewUp@vtkCamera@@QAEXNNN@Z
> ___imp_?SetViewUp@vtkCamera@@QAEXNNN@Z
>
> Does this look ok?
>
>
> When I enter the same on my Linux machine, I get different hits.
>
>
>
>
>
> General Question:
> What are the correct libraries for Windows? *.lib? *.dll?
> And what do I have to enter in the makefile: -lvtkCommon or -vtkCommon
> or -vtkCommon.dll or vtkCommon.lib
>
>
>
> Thanks, MB
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd

KarlBlau
In reply to this post by KarlBlau
I cannot find the problem. Can this be caused by two different compiler?

I used MsVisual C++ to compile VTK5.0 and MinGW in a MSYS environment
for my project.

The libs seem to be found but no VTK function are found.
It makes me wonder, that the symbols of the libs (-> nm) don't include
the symbols that are missed by the compiler.

Hmmm ... any idea?


Thanks, MB


Martin Baumann schrieb:

> Hi,
>
> I have problems compiling a program that uses VTK-5.0 to MS Windows.
> I use makefiles, MSYS and MinGW as compiler.
>
>
>
> At linking time I get the following messages:
>
> undefined reference to `_imp___ZN9vtkCamera9SetViewUpEddd´
>
> and ot more like this
>
> When I enter
>
> nm vtkRendering.lib I get
>
> ?SetViewUp@vtkCamera@@QAEXNNN@Z
> ___imp_?SetViewUp@vtkCamera@@QAEXNNN@Z
>
> Does this look ok?
>
>
> When I enter the same on my Linux machine, I get different hits.
>
>
>
>
>
> General Question:
> What are the correct libraries for Windows? *.lib? *.dll?
> And what do I have to enter in the makefile: -lvtkCommon or -vtkCommon
> or -vtkCommon.dll or vtkCommon.lib
>
>
>
> Thanks, MB
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to_imp___ZN9vtkCamera9SetViewUpEddd

Xiaofeng Z
That's what I was trying to say in my previous respose.  The two compilers,
VC++ and gcc are not binary compatible.  They decrate the identifiers
differently.

xz
http://www.xzing.org


----- Original Message -----
From: "Martin Baumann" <[hidden email]>
To: "Martin Baumann" <[hidden email]>
Cc: <[hidden email]>
Sent: Tuesday, February 07, 2006 6:33 PM
Subject: Re: [vtkusers] undefined reference
to_imp___ZN9vtkCamera9SetViewUpEddd


>I cannot find the problem. Can this be caused by two different compiler?
>
> I used MsVisual C++ to compile VTK5.0 and MinGW in a MSYS environment for
> my project.
>
> The libs seem to be found but no VTK function are found.
> It makes me wonder, that the symbols of the libs (-> nm) don't include the
> symbols that are missed by the compiler.
>
> Hmmm ... any idea?
>
>
> Thanks, MB
>
>
> Martin Baumann schrieb:
>
>> Hi,
>>
>> I have problems compiling a program that uses VTK-5.0 to MS Windows.
>> I use makefiles, MSYS and MinGW as compiler.
>>
>>
>>
>> At linking time I get the following messages:
>>
>> undefined reference to `_imp___ZN9vtkCamera9SetViewUpEddd´
>>
>> and ot more like this
>>
>> When I enter
>>
>> nm vtkRendering.lib I get
>>
>> ?SetViewUp@vtkCamera@@QAEXNNN@Z
>> ___imp_?SetViewUp@vtkCamera@@QAEXNNN@Z
>>
>> Does this look ok?
>>
>>
>> When I enter the same on my Linux machine, I get different hits.
>>
>>
>>
>>
>>
>> General Question:
>> What are the correct libraries for Windows? *.lib? *.dll?
>> And what do I have to enter in the makefile: -lvtkCommon or -vtkCommon
>> or -vtkCommon.dll or vtkCommon.lib
>>
>>
>>
>> Thanks, MB
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages on-topic.
>> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference to _imp___ZN9vtkCamera9SetViewUpEddd

David Cole
In reply to this post by KarlBlau
Unresolved externals can definitely be caused by two different compilers.

You should always use the same compiler (and the same compiler
flags/settings even) for building VTK and for building clients that link
to VTK.


David


Martin Baumann wrote:

> I cannot find the problem. Can this be caused by two different compiler?
>
> I used MsVisual C++ to compile VTK5.0 and MinGW in a MSYS environment
> for my project.
>
> The libs seem to be found but no VTK function are found.
> It makes me wonder, that the symbols of the libs (-> nm) don't include
> the symbols that are missed by the compiler.
>
> Hmmm ... any idea?
>
>
> Thanks, MB
>
>
> Martin Baumann schrieb:
>
>> Hi,
>>
>> I have problems compiling a program that uses VTK-5.0 to MS Windows.
>> I use makefiles, MSYS and MinGW as compiler.
>>
>>
>>
>> At linking time I get the following messages:
>>
>> undefined reference to `_imp___ZN9vtkCamera9SetViewUpEddd´
>>
>> and ot more like this
>>
>> When I enter
>>
>> nm vtkRendering.lib I get
>>
>> ?SetViewUp@vtkCamera@@QAEXNNN@Z
>> ___imp_?SetViewUp@vtkCamera@@QAEXNNN@Z
>>
>> Does this look ok?
>>
>>
>> When I enter the same on my Linux machine, I get different hits.
>>
>>
>>
>>
>>
>> General Question:
>> What are the correct libraries for Windows? *.lib? *.dll?
>> And what do I have to enter in the makefile: -lvtkCommon or
>> -vtkCommon or -vtkCommon.dll or vtkCommon.lib
>>
>>
>>
>> Thanks, MB
>> _______________________________________________
>> This is the private VTK discussion list. Please keep messages
>> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers