Question: I have my database (called "Starship") and I generate LinqToSql Entity Classes and Data Context with designer. As an output, i got `Starship.dbml` file with 2 sub-files:

1. `Starship.dbml.layout`
2. `Starship.designer.cs`

The problem is that I found that the designer generated my Entity classes and Data Context within this single file: `Starship.designer.cs`:

```
[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Starship")]
public partial class StarshipDataContext : System.Data.Linq.DataContext

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Roles")]
public partial class Role : INotifyPropertyChanging, INotifyPropertyChanged

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Sections")]
public partial class Section : INotifyPropertyChanging, INotifyPropertyChanged

[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CrewMembers")]
public partial class CrewMember : INotifyPropertyChanging, INotifyPropertyChanged

```

Well, I always thought that keeping single file for single class is a good practice, so why those classes are in the same file? I guess that if the database consisted of about 20 tables, this would be huge file. Is there any way of generating them in separate files?

Answer: 
Here's a demo of how to use the `mtwist` implementation of Mersenne Twister:

```
#include <stdio.h>
#include <stdlib.h>
#include "mtwist.h"

int main(void) {
   int i;
   mt_seed();
   for(i = 0; i < 10; ++i) {
      printf("%f\n", mt_ldrand());
   }
   return EXIT_SUCCESS;
}

```

Compiled and run as follows:

```
[pjs@amber:mtwist-1.4]$ gcc run-mtwist.c mtwist.c
[pjs@amber:mtwist-1.4]$ ./a.out
0.817330
0.510354
0.035416
0.625709
0.410711
0.980872
0.965528
0.444438
0.705342
0.368748
[pjs@amber:mtwist-1.4]$

```
That's not a compiler error, it's a linker error. You're missing the appropriate `-l` flag to link the library you're using. Your compiler invocation should look something like:

```
cc -o example example.c -lmtwist

```

I just took a quick look at the mtwist page you linked to, and it appears to be distributed just as source, not as a library. In that case, adding the appropriate implementation file to your command line should work:

```
cc -o example example.c mtwist.c

```

But you probably should look into a `make`-based solution that builds a real library out of the mtwist code.