Problem building the plugin tutorials in VS2017

55 views
Skip to first unread message

Euan Anderson

unread,
Feb 19, 2018, 9:07:26 AM2/19/18
to OpendTect Developers
Hello,

I am starting out for the first time with the plugin tutorials example and have the latest Visual Studio 2017 which has CMake built in.  Here is the CMakeLists.txt for the uiTut plugin:

#_______________________Pmake___________________________________________________
#
# Makefile : Tutorial plugin
# Jan 2012 K. Tingdahl
# RCS : $Id$
#_______________________________________________________________________________

set(OD_MODULE_NAME hello)
set(OD_IS_PLUGIN 1 )
set(OD_MODULE_DEPS uiODMain Tut)
set(OD_MODULE_SOURCES
uitutseistools.cc
uituthortools.cc
uitutorialattrib.cc
uitutwelltools.cc
uitutpi.cc)
SET( OD_PLUGIN_ALO_EXEC ${OD_MAIN_EXEC} )
SET( OD_NO_ALO_ENTRY 1 )
OD_INIT_MODULE()

The problem is when I run CMake the error is with the last line: Unknown CMake command "OD_INIT_MODULE"

I just thought I would ask if anyone else has tried this, i.e. is this still the correct syntax for CMake?

Thanks,
Euan Anderson

mkx...@gmail.com

unread,
Jul 19, 2018, 5:59:07 AM7/19/18
to OpendTect Developers
Hello Euan,

while you can develop on VS 2017 you still need the project configuration of VS 2013.
I use a standalone cmake gui where I tell the configuration to use Visual Studio 2013 Win 64. After that you can load the project into Visual Studio 2017, but you also must have installed VS 2013 on your machine so that VS 2017 can use the build tools (etc.) of 2013. Or you simply use VS 2013 for OD-Development.
Also don't forget to tell cmake the location of OpendTect_Dir (e.g. C:/Program Files/OpendTect/6.2.0)
I hope that helps.

Regards
Martin
Reply all
Reply to author
Forward
0 new messages