Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  30 Apr 2019, Konstantin Olchanski, Info, How to convert C midas frontends to C++ 
    Reply  05 Jun 2019, Konstantin Olchanski, Info, How to convert C midas frontends to C++ 
       Reply  13 Jan 2020, Konstantin Olchanski, Info, How to convert C midas frontends to C++, CAEN libraries 
    Reply  23 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++ 
       Reply  23 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ 
          Reply  23 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++ sc_fe_mini.cpp
             Reply  23 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ 
                Reply  23 Jul 2019, Lukas Gerritzen, Forum, How to convert C midas frontends to C++ 
                   Reply  25 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++ (my problem solved) 
                      Reply  30 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ (my problem solved) 
                      Reply  01 Aug 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ (my problem solved) 
       Reply  09 Aug 2019, Konstantin Olchanski, Forum, How to convert C midas frontends to C++ 
Message ID: 1628     Entry time: 23 Jul 2019     In reply to: 1627     Reply to this: 1629
Author: Frederik Wauters 
Topic: Forum 
Subject: How to convert C midas frontends to C++ 
> Did you include mfe.h as written in elog:1526 ?
> 
> Stefan


Yes I did

this is my include 

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <pthread.h>


#include "midas.h"
#include "mscb.h"
#include "multi.h"
#include "mscbdev.h"
#include "mfe.h"

(I attach my dummy fe)

What confuses me is that I can compile examples/experiment/ if I copy that to a 
fresh dir.

I also copied the CMakeLists from the example:

#
# cmake for the muX software
#
cmake_minimum_required(VERSION 3.3)

project(muX)

#
# find midas installation, from CMakeLists in examples/experiment
#
set(MIDAS_DIR $ENV{MIDASSYS})
message("MIDAS dir: " ${MIDAS_DIR})
if (NOT EXISTS $ENV{MIDASSYS})
  message(FATAL_ERROR "Environment variable $MIDASSYS not defined, aborting.")
endif()

set(INC_PATH ${MIDAS_DIR}/include ${MIDAS_DIR}/mxml ${MIDAS_DIR}/mscb/include 
${MIDAS_DIR}/drivers/class ${MIDAS_DIR}/drivers/device)
link_directories($ENV{MIDASSYS}/lib)

# enable certain compile warnings
add_compile_options(-Wall -Wformat=2 -Wno-format-nonliteral -Wno-strict-
aliasing -Wuninitialized -Wno-unused-function)

set(LIBS -lpthread -lutil -lrt) 


add_executable(sc_fe_mini sc_fe_mini.cpp)
target_include_directories(sc_fe_mini PRIVATE ${INC_PATH})
target_link_libraries(sc_fe_mini mfe midas ${LIBS})
Attachment 1: sc_fe_mini.cpp  9 kB  Uploaded 23 Jul 2019  | Show | Show all
ELOG V3.1.4-2e1708b5