Thanks for responding! I add this line but CMake gives me the following errors when I configure it:

CMake Error at E:/VXL/VXL_BIN/VXLConfig.cmake:33 (INCLUDE):

include could not find load file:

E:/VXL/VXL_BIN2/VXLLibraryDepends.cmake

Call Stack (most recent call first):

CMakeLists.txt:4 (FIND_PACKAGE)

Configuring incomplete, errors occurred!



What does this mean? 


Best regards,

Hao Wu




On Fri, Jul 19, 2013 at 11:46 AM, Wheeler, Frederick W (GE Global Research) <wheeler@ge.com> wrote:

 

Have a look at section B.1.3 in the VXL book for examples of how to set up your CMakeLists.txt file.  You are missing this line:

 

FIND_PACKAGE(VXL)

 

http://public.kitware.com/vxl/doc/release/books/core/book_16.html#SEC196

 

Fred

 

From: Hao Wu [mailto:haowu128@gmail.com]
Sent: Friday, July 19, 2013 12:17 PM
To: vxl-users@lists.sourceforge.net
Subject: [Vxl-users] HelloWorld

 

Hi,

 

I am new to VXL and I just installed it on Windows. I want to test it by building my first project "VXL_HelloWorld" but it failed when building in Visual Studio 2010. 

 

Here is my CMakeLists.txt:

 

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(VXL_HelloWorld)

 

IF(VXL_FOUND)

  INCLUDE(${VXL_CMAKE_DIR}/UseVXL.cmake)

ENDIF(VXL_FOUND)

 

ADD_EXECUTABLE(HelloWorld HelloWorld.cxx )

TARGET_LINK_LIBRARIES( HelloWorld vcl )

 

 

And here is my source code:

 

#include <vcl_iostream.h>

int main()

{

  // send string "hello world" to the standard output stream cout.

  vcl_cout << "Hello world\n";

  return 0;

}

 

 

After I use CMake to compile and generate the project, I opened the .sln file and try to build it but it failed and gives the following errors:

Error  1          error C1083: Cannot open include file: 'vcl_iostream.h': No such file or directory  

          2          IntelliSense: cannot open source file "vcl_iostream.h"          

          3          IntelliSense: identifier "vcl_cout" is undefined

 

 

I guess there may be some problem with my CMakeLists.txt. 

Could you help me find out the problem?

 

Thanks and best regards,

Hao Wu