Building OSCATS for Windows

59 views
Skip to first unread message

AStudentForLife

unread,
Aug 24, 2011, 1:20:00 PM8/24/11
to OSCATS Discussion Group
Hello,
I was wondering if anyone has tried to build the OSCAT (and its
dependencies) on Windows using a MSVC compiler? Any tips would be
appreciated.

Thanks,
AStudentForLife

Michael Culbertson

unread,
Aug 25, 2011, 10:22:57 AM8/25/11
to AStudentForLife, osc...@googlegroups.com
Hello,

Building liboscats itself requires GNU make and a shell script
interpreter, at least, if not some other tools. Using MSVC *might* be
possible (though probably difficult), and hasn't been tested. Using
GCC from the MSYS/Mingw system (http://www.mingw.org) has been tested
and works (in fact, that's how the pre-built binaries were created).

Linking against the pre-built binaries with MSVC should, In
principle, be possible; but since I don't have MSVC, I haven't tried
it. You may need to create an import library (liboscats-0.lib) for
MSVC. I think this can be accomplished using the attached exports
file and the command:

lib /machine:i386 /def:liboscats-0.def

Then use the resulting liboscats-0.lib to link the test program with liboscats.

If you don't mind giving this a try, please let me know how it turns out!

Thanks,

Michael Culbertson

QUERIES Division
Department of Educational Psychology
University of Illinois, Urbana-Champaign

> --
> You received this message because you are subscribed to the Google Groups "OSCATS Discussion Group" group.
> To post to this group, send email to osc...@googlegroups.com.
> To unsubscribe from this group, send email to oscats+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/oscats?hl=en.
>
>

liboscats-0.def

Ashutosh Apte

unread,
Aug 29, 2011, 1:23:23 PM8/29/11
to Michael Culbertson, osc...@googlegroups.com
Hi Michael,
    Thanks for your quick response. Yes, I was able to create a import library (.lib) using "dumpbin" and "lib" tools and then used it to build the C example.

I ran into issues when trying to run the example. Here is a link to the problem I ran into: http://code.google.com/p/oscats/issues/detail?id=1

The highlighted function call fails.
(Test.exe:40840): OSCATS-CRITICAL **: oscats_cont_model_set_param_by_index: assertion `OSCATS_IS_CONT_MODEL(model) && index < model->Np' failed

Based on my very limited understanding of the source code, it seems that oscats_cont_model_set_param_by_index() fails because I could not find an implementation for oscats_cont_model_get_type(). There are other functions oscats_XXX_get_type() for which I could not find an implementation. I wonder if the Windows dll was mistakenly built without these implementations?

Michael Culbertson

unread,
Aug 30, 2011, 10:31:09 PM8/30/11
to Ashutosh Apte, osc...@googlegroups.com
Hello,

I was able to get access to MSVC++ Express 10 and successfully built
and ran the example program.

The *_get_type() functions are included in the pre-built DLL. When
I ran dumpbin on the DLL, oscats_cont_model_get_type was listed (and
it's also listed by Dependency Walker, dependencywalker.com). But,
the list of functions dumpbin gave me also suspiciously listed some
symbols as equivalent that should *not* have been. I wonder if the
.lib file you built didn't include oscats_cont_model_get_type (or
pointed the symbol to the wrong function!) for one reason or
another---perhaps your version of dumpbin mistakenly equated it with
another function? In any case, the .def file that I previously
attached had incorrect ordinal numbers in it. I had to strip them out
and then could use MSVC lib to create the import library.

I was going to attach the import library here, but gmail refuses to
accept it, so I added it as an attachment to the issue on Google code:
http://code.google.com/p/oscats/issues/detail?id=1

Give this version of the import library a try and see if that
resolves the issue you were having.

Thanks,

Michael Culbertson

QUERIES Division
Department of Educational Psychology
University of Illinois, Urbana-Champaign

Reply all
Reply to author
Forward
0 new messages