Al final he conseguido crear el archivo .a<br><br>Me he bajado MinGW y he seguido los pasos. El archivo lo he puesto en la carpeta "C:\Dev-Cpp\lib" que es la carpeta donde tengo todos los archivos ".a". He intentado compilar el archivo y sigue dandome error.<br>
<br><div class="gmail_quote">El 25 de noviembre de 2009 10:10, iñaki muñoz <span dir="ltr"><<a href="mailto:kukuso@gmail.com">kukuso@gmail.com</a>></span> escribió:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Lo que quiero es compilar este programa<br><br><br><br>#include <stdio.h>        // Needed for printf etc<br>#include <objbase.h>    // Needed for COM functionality<br>#include "XsensCMT.h"<br>#include <conio.h>        // included for _getch and _kbhit<br>

<br>// this macro tests for an error and exits the program with a message if there was one<br>#define EXIT_ON_ERROR(res,comment) if (res != XRV_OK) { printf("Error %d occurred in " comment ": %s\n",res,cmtGetResultText(res)); exit(1); }<br>

<br>long instance = -1;<br>// used to signal that the user initiated the exit, so we do not wait for an extra keypress<br>int userQuit = 0;<br><br>void exitFunc(void)<br>{<br>    // if we have a valid instance, we should get rid of it at the end of the program<br>

    if (instance != -1)<br>        cmtDestroyInstance(instance);<br><br>    // get rid of keystrokes before we post our message<br>    while (_kbhit()) _getch();<br><br>    // wait for a keypress<br>    if (!userQuit)<br>

    {<br>        printf("Press a key to exit\n");<br>        _getch();<br>    }<br>}<br><br><br><br>int main(int argc, char* argv[])<br>{<br>    (void) argc; (void) argv;    // Make the compiler stop complaining about unused parameters<br>

<br>    XsensResultValue res;<br><br>    atexit(exitFunc);<br>    printf("Scanning for connected Xsens devices\n");<br><br>    CmtPortInfo portInfo[256];<br>    unsigned long portCount = 0;<br>    res = cmtScanPorts(portInfo, &portCount, 0);<br>

    EXIT_ON_ERROR(res,"cmtScanPorts");<br>    printf("Using port number %d at %d baud\nConnected MT has device Id %08x\n\n",(long) portInfo[0].m_portNr, portInfo[0].m_baudrate, portInfo[0].m_deviceId);<br>

<br>    // lets create the cmt instance to handle the sensor<br>    printf("Creating a CMT instance\n");<br><br>    ///// *********  Enter your own serial code here... ie. "12345-12345-12345-12345"<br>

    ///// The "demo1" serial code has a severely limited number of function calls per instance,<br>    ///// which is adequate for this example, but not for production code<br>    instance = cmtCreateInstance("demo1");<br>

    if (instance != -1)<br>        printf("CMT instance created!\n\n");<br>    else<br>    {<br>        printf("Creation of CMT instance failed, probably because of an invalid serial number\n");<br>        exit(1);<br>

    }<br><br>    res = cmtOpenPort(instance, portInfo[0].m_portNr, portInfo[0].m_baudrate);<br>    EXIT_ON_ERROR(res,"cmtOpenPort");  <br>    printf("Port opened.\n");<br><br>    // set sensor to config sate<br>

    res = cmtGotoConfig(instance);<br>    EXIT_ON_ERROR(res,"cmtGotoConfig");<br><br>    // retrieve the device count<br>    unsigned short deviceCount;<br>    printf("Retrieving the device count (this should be 1 for this example)\n");<br>

    res = cmtGetDeviceCount(instance,&deviceCount);<br>    EXIT_ON_ERROR(res,"cmtGetDeviceCount");<br>    printf("Device count is %d\n",(long) deviceCount);<br><br>    // retrieve the device ID of the first device<br>

    CmtDeviceId deviceId;<br>    printf("Retrieving the device ID\n");<br>    res = cmtGetDeviceId(instance, &deviceId, 0);<br>    EXIT_ON_ERROR(res,"cmtGetDeviceId");<br>    printf("Device ID is %08x\n",(long) deviceId);<br>

<br>    // make sure that we get the freshest data<br>    printf("Setting queue mode so that we always get the latest data\n");<br>    res = cmtSetQueueMode(instance,CMT_QM_LAST);<br>    EXIT_ON_ERROR(res,"cmtSetQueueMode");<br>

<br>    // set the device output mode<br>    printf("Setting the output mode to orientation data in euler angles at 100Hz\n");<br>    res = cmtSetDeviceMode(instance, CMT_OUTPUTMODE_ORIENT, CMT_OUTPUTSETTINGS_ORIENTMODE_EULER, 100, deviceId);<br>

<br>    // start receiving data<br>    res = cmtGotoMeasurement(instance);<br>    EXIT_ON_ERROR(res,"cmtGotoMeasurement");<br><br>    // Wait for first data item(s) to arrive. In production code, you would use a callback function instead (see cmtSetCallbackFunction)<br>

    Sleep(20);<br><br>    // we should have some data by now, so let's see what it holds<br>    CmtEuler data;<br>    while(!userQuit && res == XRV_OK)<br>    {<br>        res = cmtGetNextDataBundle(instance);<br>

        if (res != XRV_OK)<br>            break;        // this may happen because we exceeded the maximum function call count<br><br>        res = cmtDataGetOriEuler(instance, &data, deviceId);    // since we only have one device attached, we don't need to supply the deviceId in most calls<br>

        if (res != XRV_OK)<br>            break;        // this may happen because we exceeded the maximum function call count<br>    <br>        res = cmtDataGetOriEuler(instance, &data, deviceId,NULL );<br>        printf("Roll: %6.2f Pitch: %6.2f Yaw: %6.2f\n", data.m_roll,data.m_pitch, data.m_yaw );<br>

<br>        // wait 1 second<br>        Sleep(1000);<br><br>        if (_kbhit())<br>            userQuit = 1;<br>    }<br><br>    // normally it is nice to destroy the instance, but this is done automatically when the program exits<br>

    //cmtDestroyInstance(instance);<br><br>    return 0;<br>}<br><br><br>Y estos errores son los que me salen:<br><br>3  C:\Program Files\Xsens\Software Development\Examples\Sample_main.cpp<br>    In file included from C:\Program Files\Xsens\Software Development\Examples\Sample_main.cpp <br>

<br>A partir de aquí vienen un porron de errores con XsensCMT.h<br><br>He instalado los drivers del sensor, he puesto el .h dentro del include C++, el archivo .dll en la carpeta .DLL y el .lib en la carpeta de lib por si así funcionaría. Pero nada.<br>

<br>Tambien he intentado hacer lo que comentó Salvador pero no encuentro la mitad de los archivos que me pide. He instalado, la librería de MySql y los archivos <i>libmysql.lib, </i><i>reimp.exe, </i><i>dlltool.exe, y </i><i>as.exe no los encuentro.<br>

<br></i>
</blockquote></div><br>