|
Back
Midas
Rome
Roody
Rootana
|
Midas DAQ System |
Not logged in |
|
|
30 Apr 2019, Konstantin Olchanski, Info, How to convert C midas frontends to C++
|
05 Jun 2019, Konstantin Olchanski, Info, How to convert C midas frontends to C++
|
13 Jan 2020, Konstantin Olchanski, Info, How to convert C midas frontends to C++, CAEN libraries
|
23 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++
|
23 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++
|
23 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++
|
23 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++
|
23 Jul 2019, Lukas Gerritzen, Forum, How to convert C midas frontends to C++
|
25 Jul 2019, Frederik Wauters, Forum, How to convert C midas frontends to C++ (my problem solved)
|
30 Jul 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ (my problem solved)
|
01 Aug 2019, Stefan Ritt, Forum, How to convert C midas frontends to C++ (my problem solved)
|
09 Aug 2019, Konstantin Olchanski, Forum, How to convert C midas frontends to C++
|
|
Message ID: 1629
Entry time: 23 Jul 2019
In reply to: 1628
Reply to this: 1630
|
Author: |
Stefan Ritt |
Topic: |
Forum |
Subject: |
How to convert C midas frontends to C++ |
|
|
Have you left any "extern C" in your frontend program or in any of the used header file. Seems
like the linker cannot find the poll_event in your frontend code. If it's there, but it's compiled
with C calling (instead of C++), the name mangling causes it to be invisible to the linker. That
usually happens if there is somewhere
extern C {
INT poll_event();
...
}
while it is NOT defined as "extern C" in mfe.h which is used by mfe.cxx.
Stefan
> > 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}) |