num208jn at MBDS.NRC.CA (John Nash) writes:
>Has anybody managed to compile PRIMER with TurboC++ (for IBM-PCs)?
>I downloaded the source via FTP and compiled it with my trusty TurboC++
>compiler (as a C program, not a C++ one). It compiled but gave me a
>number of warnings (which I haven't investigated in great detail -
>most of them were benign "Function has no return value" type ones). I
>looked at the MAKE file for MSC, and adjusted the stack size as
>suggested, and it made no difference, the program displays the opening
>screen and hangs.
I had the same problem. The reason for the crash is that PRIMER
mallocs memory without checking if it got what it asked for. It then
proceeds to write into this presumed memory, which of course is
asking for trouble.
If you fiddle with the #defines in the header file (NUM_GLOBAL_STRINGS
for instance) so that not to much memory is allocated, you can get it to
run without modifying anything else in the source. It might be easier
though to introduce checks for valid pointers before the program attempts
to write to them. That is how I found the optimal settings for the
#defines without having to go through a lot of crashes.
Send a mail if you need more help.
Carl-Georg Meinhof | Internet: meinhof at sun1.ruf.uni-freiburg.de
Institut fuer Biologie 3 | BITNET: meca at dfrruf1
Universitaet Freiburg | Phone: +49-761-203-2711
D-7800 Freiburg, Germany | Fax: +49-761-203-2745
Carl-Georg Meinhof,203-2711 <meinhof at sun1.ruf.uni-freiburg.de>