~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to testsuite/tests/lib-dynlink-csharp/main.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
let load s =
 
2
  Printf.printf "Loading %s\n%!" s;
 
3
  try
 
4
    Dynlink.loadfile s
 
5
  with Dynlink.Error e ->
 
6
    print_endline (Dynlink.error_message e)
 
7
 
 
8
let () =
 
9
  print_endline "Main is running.";
 
10
  Dynlink.init ();
 
11
  Dynlink.allow_unsafe_modules true;
 
12
  let s1,s2 =
 
13
    if Dynlink.is_native then
 
14
      "../../../otherlibs/bigarray/bigarray.cmxs",
 
15
      "plugin.cmxs"
 
16
    else
 
17
      "../../../otherlibs/bigarray/bigarray.cma",
 
18
      "plugin.cmo"
 
19
  in
 
20
  load s1; 
 
21
  load s2;
 
22
  print_endline "OK."
 
23