We are trying to compile and run a program that calls an opentm2 api.

We are trying to use the example in the OpenTM2APICalls.pdf (pag 5).

The example has several errors, but anyway the real problem is that we have not been able to compile a much simple version of the sample code.

We have created a test program that creates an EQFsession and then just close it.

We are using VS2010. We have created a C++ empty project and create a main c file. We have been able to place the source without errors.

The code is very simple, we have created a test.c program.

#include <EQF.H>

#include <OTMFUNC.H>



         USHORT usRC = 0;

         HSESSION hSession = 0L;

        // start the Eqf session us

        usRC = EqfStartSession( &hSession );

        if ( !usRC )

        { // nothing right now...        }

        if ( hSession != 0L )

        {        EqfEndSession( hSession );        }



 We have the following include directories en the vs2010 compile environment:

C:\V1.3.0\include;C:\V1.3.0\mri;c:\V1.3.0\source\api (where 1.3.0 is the source files directory)

For the library files (as we are not able to compile the source files right now) we have included the 1.3.1 (as our 1.3.0 version has been updated)


I know there is a mismatch level, but i pretty sure this is not the problem.

When we try to run, the linker complains:

test.obj : error LNK2019: unresolved external symbol _EqfEndSession referenced in function _main

test.obj : error LNK2019: unresolved external symbol _EqfStartSession referenced in function _main

C:\U\pro\vs2010\test\CEjem3\Debug\CEjem3.exe : fatal error LNK1120: 2 unresolved externals

We have browse the web, and there are so many reasons, but not sure the root cause.I am not really expert in this c stuff.


a) Do you have complete a simple file with all the includes that has been compiled and linked correctly?

b) We are aware that there are some differences in the behavior between C and C++. What do you recommend a C or a C++ development environment?

c) Can you provide some help about the linker error we have right now?

Thanks in advance

miguel canals

    CommentAdd your comment...