A list for the developers of CellML tools

Text archives Help


Re: [[cellml-dev] ] Problems with DOMModelLoader


Chronological Thread 
  • From: David Nickerson <david.nickerson AT gmail.com>
  • To: cellml-tools-developers AT lists.cellml.org
  • Subject: Re: [[cellml-dev] ] Problems with DOMModelLoader
  • Date: Sat, 10 May 2014 10:14:22 +1200

Hi Jesús,

Are you using the pre-built binary download of the CellML API for
MinGW? I'm not aware of anyone who is using that build of the API in
any software - all the window's users use the Visual Studio build (I
think). So that might be an issue.

You code looks fine, so thats not the problem.

You might have seen Mike's email the other day regarding future
development of the CellML API. We know documentation and usability of
the current API leaves a lot to be desired, but any input you might
have for the document Mike sent round would be most appreciated.


Cheers,
David.

On Fri, May 9, 2014 at 11:35 PM, Jesús Brosed Escario
<alu.05461 AT usj.es>
wrote:
> Hi All,
> My name is Jesus and I need to use CellML API 1.11 in my final University
> project. I'm working under Eclipse with C++ as programming language with
> mingw g++ compiler. My OS is Windows 7. I link the include and library
> folders in my Eclipse IDE, it compile well but the executable file crash.
>
> The simple code that I try in a test.cpp file is:
>
> #include <iostream>
> #include <stdio.h>
> #include <stdlib.h>
> #include <IfaceCellML_APISPEC.hxx>
> #include <CellMLBootstrap.hpp>
> #include <cellml-api-cxx-support.hpp>
>
> using namespace iface::cellml_api;
> using namespace std;
>
> int main()
> {
> DOMModelLoader* dml;
> CellMLBootstrap* cl;
>
> cl = CreateCellMLBootstrap();
> dml = cl->modelLoader();
> try {
> Model *m =
> dml->loadFromURL(L"http://www.cellml.org/models/beeler_reuter_1977_version04/download";);
> m->createCellMLVariable();
> } catch (iface::cellml_api::CellMLException&)
> {
> std::wstring msg = dml->lastErrorMessage();
> printf("Got a CellML Exception loading a model. Error was
> %S\n",msg.c_str());
> return 1;
> }
> return 0;
> }
>
>
> The line where it crash in execution time is when I try to assign the
> modelLoader() to the DOMModelLoader variable (dml = cl->modelLoader();). I
> can't find where is the problem because in all documentation that I found
> these are the basic instructions to start working with CellML.
>
> Thank you very much for your help.
>
> Best,
> Jesús.
>



Archive powered by MHonArc 2.6.18.

Top of page