sorib / truecrack

Automatically exported from code.google.com/p/truecrack
GNU General Public License v3.0
0 stars 0 forks source link

-lm during linking should be last #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile on latest stable ubuntu
2. Read error

What is the expected output? What do you see instead?
cc -I./Common/ -I./Crypto/ -I./Cuda/ -I./Main/ -I./ -lm  -o truecrack  
Volumes.o Crc.o Endian.o  Pkcs5.o CpuCore.o Core.o Charset.o Utils.o Main.o  
Rmd160.o CpuAes.o   #Crypto/Aes_x86.o Crypto/Aes_hw_cpu.o
Charset.o: In function `numberOfStrings':
Charset.c:(.text+0x60): undefined reference to `pow'
Charset.o: In function `indexedWordFromAlphabet':
Charset.c:(.text+0x190): undefined reference to `pow'
collect2: ld returned 1 exit status
make: *** [truecrack] Error 1

What version of the product are you using? On what operating system?
Ubuntu 64bit,

Please provide any additional information below.
It compiled fine on my pc, Archlinux 64bit, but didn't on a collegue ones. 

This
http://stackoverflow.com/questions/1517138/trying-to-include-a-library-but-keep-
getting-undefined-reference-to-messages

led me to try and move the -lm argument in the LDFLAGS to the end of the 
"truecrack" target like so:

truecrack: $(obj ...
  $(CC) ... snip ... -lm

Original issue reported on code.google.com by patrik.p...@gmail.com on 17 Jan 2012 at 5:34

GoogleCodeExporter commented 9 years ago
ah well, -lm at the end of the truecrack target, resolved this issue - should 
have mentioned that

Original comment by patrik.p...@gmail.com on 17 Jan 2012 at 5:35

GoogleCodeExporter commented 9 years ago
thanks.. i fix the makefile for machine at 64bit.

Original comment by luck87 on 18 Jan 2012 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by luck87 on 7 Feb 2012 at 1:11