[vtkusers] Cannot use 'extern' keyword in a project made by Cmake?

Janny Dong jydong at vt.edu
Tue Apr 10 11:05:30 EDT 2007


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/20070410/e76231e7/attachment.htm>


More information about the vtkusers mailing list