Hi Vivien,

just adapt the StartVS_Debug.bat to your current solution and copy it to your 
build folder. I don't think you have to change anything besides the name of 
your *.sln in the batch file.


Greets!

Date: Sat, 23 Mar 2013 10:27:18 +0800
From: [email protected]
To: [email protected]
Subject: [mitk-users] Beginner's question: Getting started with Tutorial        
Step0

Hi, I followed the Build Instrction to build MITK with CMake:  
http://docs.mitk.org/2012.12/BuildInstructionsPage.html

The CMake configuration is all by default:(working C compiler using: Visual 
Studio 9 2008)     MITK_USE_SUPERBUILD——ON     BUILD_SHARED_LIBS——ON     
BUILD_TESTING——ON
     ...     MITK_BUILD_EXAMPLES——OFF     ...
And after Configure and Generate success, I compiled the MITK-superbuild.sln 
(D:\MITK-superbuild\MITK-superbuild) with no error. 

Then, I start to follow the Tutorial chapters. 
http://docs.mitk.org/2012.12/Step00Page.html  Step 0: Getting started. It said 
that MITK_BUILD_EXAMPLES should be checked/set to ON (but mine is OFF). So, 
what should I do now? 

I choose to compile those examples one by one by myself:     1. Create a new 
folder Test (D:\Test),      2. Copy Step1.cpp, QtTesting.h and QtTesting.cpp 
(D:\MITK-superbuild\MITK\Examples\Tutorial) in D:\Test.
     3. The CMakeLists.txt is :
                                                CMAKE_MINIMUM_REQUIRED(VERSION 
2.8.2)                                           
                                                PROJECT(Step1)                  
                                                                        
set(project_policies
                                                   CMP0001 # NEW: 
CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.                         
                         CMP0002 # NEW: Logical target names must be globally 
unique.
                                                   CMP0003 # NEW: Libraries 
linked via full path no longer produce                                          
    linker search paths.                                               CMP0004 
# NEW: Libraries linked may NOT have leading or trailing 
                                                whitespace.                     
                           CMP0005 # NEW: Preprocessor definition values are 
now escaped                                                automatically.
                                                   CMP0006 # NEW: Installing 
MACOSX_BUNDLE targets requires a BUNDLE                                         
   DESTINATION.                                               CMP0007 # NEW: 
List command no longer ignores empty elements.
                                                   CMP0008 # NEW: Libraries 
linked by full-path must have a valid                                           
    library file name.                                                 CMP0009 
# NEW: FILE GLOB_RECURSE calls should not follow symlinks by 
                                                default.                        
                           CMP0010 # NEW: Bad variable reference syntax is an 
error.                                               CMP0011 # NEW: Included 
scripts do automatic cmake_policy PUSH and POP.
                                                   CMP0012 # NEW: if() 
recognizes numbers and boolean constants.                                       
            CMP0013 # NEW: Duplicate binary directories are not allowed.
                                                   CMP0014 # NEW: Input 
directories must have CMakeLists.txt                                            
   )                                            foreach(policy 
${project_policies})
                                                   if(POLICY ${policy})         
                                     cmake_policy(SET ${policy} NEW)            
                                   endif()
                                                endforeach()                    
                                                                        
FIND_PACKAGE(MITK REQUIRED)
                                                                                
                MITK_USE_MODULE(QmitkExt)                                       
                                                        INCLUDE_DIRECTORIES(
                                                   ${CMAKE_CURRENT_SOURCE_DIR}  
                                           ${ALL_INCLUDE_DIRECTORIES}           
                                )
                                                
LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES})                                      
                                                        ADD_EXECUTABLE(Step1 
Step1.cpp QtTesting.cpp)
                                                TARGET_LINK_LIBRARIES(Step1 
${ALL_LIBRARIES})
     4. Then CMake it: configure and generate                                   
        source code: D:/Test
                                                build the binaries: D:/Test/bin 
         5. Then open the Step1.sln (D:\Test\bin), and compile it successful.
                                 Howerver, when I press ctrl+F5 to run it ,a 
error shows that missing "Mitk.dll"!                
                 I search the web want to find the solution, and someone said 
it should first start with 
StartVS_debug.bat(D:\MITK-superbuild\MITK-superbuild\MITK-build).               
So, as a beginner, I'm confused.  Should I move the "Test" folder in the  
"D:\MITK-superbuild\MITK-superbuild\MITK-build"? If not, how can I create a 
batch file by myself to set the environment variables?
                 
I really hope someone can help me, Thank you!!!

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users                         
                  
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to