Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » compiling libsbml with MinGW
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
robplatt


Posts: 7
Location:
University of Manchester
Registered:
January 2008
Re: compiling libsbml with MinGW 30 Apr '08 12:36 Go to previous messageGo to previous message

Here are the errors:

List.cpp:335: error: function `List_t* List_create()' definition is marked dllimport.
List.cpp:346: error: function `ListNode_t* ListNode_create(void*)' definition is marked dllimport.
...
List.cpp:479: error: function `void* List_remove(List_t*, unsigned int)' definition is marked dllimport.
List.cpp:490: error: function `unsigned int List_size(const List_t*)' definition is marked dllimport.
List.cpp: In member function `List* List::findIf(int (*)(const void*)) const':
List.cpp:30: warning: non-inline function 'List::List()' is defined after prior declaration as dllimport: attribute ignored
List.cpp:72: warning: non-inline function 'void List::add(void*)' is defined after prior declaration as dll
...
etc

I did solve the issue, but not with a configure option.

The configure script picks up mingw but there is no case for mingw in the $host_os case list.

As a quick fudge, I directly edited the extern.h and XMLExtern.h files and found that if I define out the dllimport/dllexport then it compiles through nicely with expat. In export.h and XMLExport.h we have:

#if ( WIN32 && ! defined CYGWIN )

Which does not distinguish MinGW and MSVC. This also results in ignore warnings from gcc about MSVC #pragmas (harmless but avoidable).

That said, dllimport should be possible with mingw. It could be the version I am using (MinGW 5.1.3 with gcc 3.4.5). Different versions of gcc handle dllimports in different ways, and there are some issues out there, particularly when using dllimport for classes (which libsbml does).

I think that it advisable to have a configure option for disabling shared libraries, (like the --disable-shared provided by libtool). It might also be worth considering auto-import with gcc compilers...

Regards
Rob

      

SubjectPosterDate
Read Message   compiling libsbml with MinGW robplatt30 Apr '08 00:43
Read Message   Re: compiling libsbml with MinGW  robplatt30 Apr '08 12:36
Read Message   Re: compiling libsbml with MinGW Mike Hucka02 May '08 09:53
Previous Topic:Important: libsbml-discuss has been renamed
Next Topic:configure --with-java fails for IcedTea on Fedora 8
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.