mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2023-02-04, 00:00   #23
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

107158 Posts
Default

Quote:
Originally Posted by frmky View Post
Put -lgmp after the file that uses it.
Code:
$ g++ seqcatb2.cpp -lgmp -o seqcatb
I can confirm this behaviour:

Code:
┌──(paul㉿kali)-[~]
└─$ g++ -lgmp -o ed ed.cpp
/usr/bin/ld: /tmp/ccax6sFT.o: in function `main':
ed.cpp:(.text+0x15): undefined reference to `__gmpz_init_set_ui'
collect2: error: ld returned 1 exit status
                                                                                                                                                                                                                                           
┌──(paul㉿kali)-[~]
└─$ g++ -o ed ed.cpp -lgmp

Last fiddled with by paulunderwood on 2023-02-04 at 00:02
paulunderwood is online now   Reply With Quote
Old 2023-02-04, 01:04   #24
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

124508 Posts
Default

Quote:
Originally Posted by frmky View Post
Put -lgmp after the file that uses it.
Code:
$ g++ seqcatb2.cpp -lgmp -o seqcatb
That was the key! But, I just checked and in all my files where I commented on the command to compile under Ubuntu, they are in the other order. I'm sure it used to compile with that order. I often simply copied/pasted from the source to compile.

Thank you!
EdH is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
why is P1 no longer awarded? tsc Information & Answers 12 2020-10-26 00:28
When are we no longer humane? jasong jasong 10 2012-12-04 05:00
Compile v26 on Windows Brain Software 1 2010-11-24 00:34
Anyone want to compile an OS X ecm for yoyo? jasong GMP-ECM 1 2009-03-14 11:22
help to compile.... em99010pepe Programming 8 2006-12-06 17:11

All times are UTC. The time now is 21:47.


Tue Mar 28 21:47:11 UTC 2023 up 222 days, 19:15, 0 users, load averages: 0.92, 1.00, 0.98

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

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔