# FreeBSD 6.2 - g++-4.1.2 Compilation error



## spartan_2020 (Dec 13, 2010)

Hi,

I am getting the following linker error when I try to compile c++ code using g++-4.1.2.
The error is as follows:


```
could not read symbols: Memory exhausted
collect2: ld returned 1 exit status
```

Could anybody let me know what is the cause for this error? I am using FreeBSD 6.2 virtual image with 2gigs of Memory. I tried to change the sysctl variables(vm.kmem_size) too but that didn't work.

Thanks!


----------



## sizemj (Dec 28, 2010)

Do you have a swap slice set up? I did a little research and this may do to a swap partition not working or not big enough.


----------

