Go Back > Great Internet Mersenne Prime Search > Data

Thread Tools
Old 2006-08-27, 14:46   #1
James Heinrich
James Heinrich's Avatar
"James Heinrich"
May 2004
ex-Northern Ontario

22·883 Posts
Default compiling decomp under linux

I'd like to get the decomp program running on my linux server (RedHat9, 2.4.20), but I'll show off my C ignorance here and ask for help getting it to compile... this is what I get:
# gcc DECOMP.C
DECOMP.C: In function `int isprime(long unsigned int)':
DECOMP.C:24: warning: assignment to `long unsigned int' from `double'
DECOMP.C:24: warning: argument to `long unsigned int' from `double'
DECOMP.C: In function `void decompress_factors(char*)':
DECOMP.C:219: `isdigit' undeclared (first use this function)
DECOMP.C:219: (Each undeclared identifier is reported only once for each
   function it appears in.)
DECOMP.C:227: `atoi' undeclared (first use this function)
DECOMP.C: At global scope:
DECOMP.C:369: `main' must return `int'
What do I do?
James Heinrich is offline   Reply With Quote
Old 2006-08-27, 15:20   #2
akruppa's Avatar
Aug 2002

2,467 Posts

Here's a slightly modified decomp.c for Linux. It includes the required headers and tries to open both lower case and upper casefile names - unlike Windows, Linux is case-sensitive. Remember to include the math library with the -lm switch when compiling.

Attached Files
File Type: zip (2.6 KB, 177 views)
akruppa is offline   Reply With Quote
Old 2006-08-27, 15:59   #3
James Heinrich
James Heinrich's Avatar
"James Heinrich"
May 2004
ex-Northern Ontario

67148 Posts

it works!

James Heinrich is offline   Reply With Quote

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling a static Linux gmp-ecm version yoyo GMP-ECM 9 2016-12-25 22:46
Compiling ggnfs on linux rmd Software 2 2015-11-08 15:38
compiling ggnfs in Linux framontb Factoring 2 2013-09-13 02:58
compiling mprime on linux graysky Software 6 2011-03-14 07:00
msieve linux compiling Trevil Msieve 2 2009-12-06 19:49

All times are UTC. The time now is 13:08.

Tue Dec 7 13:08:46 UTC 2021 up 137 days, 7:37, 0 users, load averages: 1.51, 1.49, 1.57

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.