mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Data

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

1100011011112 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:
Code:
# 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
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

25·7·11 Posts
Default

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.

Alex
Attached Files
File Type: zip decomp_linux.zip (2.6 KB, 114 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

3·1,061 Posts
Default

it works!

Thanks!
James Heinrich is offline   Reply With Quote
Reply

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 00:40.

Sat Nov 28 00:40:55 UTC 2020 up 78 days, 21:51, 3 users, load averages: 1.10, 1.19, 1.16

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.