[vtkusers] Cannot use 'extern' keyword in a project made by Cmake?
Paul Tait - OPES
Paul at opes.com.au
Tue Apr 10 20:08:35 EDT 2007
Sounds like this is actually a C problem. int year must be declared in some
source file without the extern. All extern does is tell the compiler and
linker "dont worry you'll find this somewhere eventually" But you lied and
to a compiler too!!!!!
-----Original Message-----
From: vtkusers-bounces+paul=opes.com.au at vtk.org
[mailto:vtkusers-bounces+paul=opes.com.au at vtk.org] On Behalf Of Janny Dong
Sent: Tuesday, 10 April 2007 11:06 PM
To: vtkusers at vtk.org
Subject: [vtkusers] Cannot use 'extern' keyword in a project made by Cmake?
Hello VTKusers,
I have been learning how to use VTK with MFC in my visualization project. VS
2005 is installed on my machine. I succeeded in building all VTK files and
running some examples. When I generated my own project with Cmake, I
couldn't build it. I declared several variables in my header file using the
keyword 'extern'. For example, 'extern int year, month, day'. In the
building process, I kept getting errors like
'error LNK2001: unresolved external symbol "int year" (?year@@3HA)'
When I deleted the word 'extern', my project got built. Anyone has any
thoughts? Thanks in advance.
Janny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070411/694f5c9c/attachment.htm>
More information about the vtkusers
mailing list