Update, so nobody wastes time... 

I did some research regarding linking static libraries 
(/usr/lib/libpoker-eval.a) and thus added 
/usr/lib/libpoker-eval.a << static library to my original gcc statement

gcc -o eval eval.c 

to 

gcc eval.c /usr/lib/libpoker-eval.a -o eval

Now it compiles, newbie mistake

thanks, sorry and thanks!

Ryan
From: [email protected]
To: [email protected]
Subject: Compiling poker-eval using gcc on linux (Debian Lenny)‏
Date: Tue, 25 May 2010 21:19:41 -0400








Hi Loic,

I understand you are probobly busy, but I've run into a
wall while using the pokersource poker-eval library hopefully you can
take a second to shed some light on the issue, as I've google a ton and
am on day 3 of trying to figure out how to integrate the eval functions
into my own C-coded network pokergame (a primer for me to using sockets
in C).

So far I have prepared my code to supply eval with txt
based hand descriptions i.e. jh 9s the problem is I can't compile my
program anymore because gcc complains about unresolved references.  I
have included include references in my source code to your header files
from the src/includes directory, but still it complains, typical output
from gcc being something like:



/tmp/ccIerv1Z.o: In function `parseArgs':
eval.c:(.text+0x17): undefined reference to `StdDeck'
eval.c:(.text+0x4c): undefined reference to `StdDeck_cardMasksTable'
eval.c:(.text+0x53): undefined reference to `StdDeck_cardMasksTable'
eval.c:(.text+0x6b): undefined reference to `StdDeck_cardMasksTable'
eval.c:(.text+0x72): undefined reference to `StdDeck_cardMasksTable'
/tmp/ccIerv1Z.o: In function `main':
eval.c:(.text+0x1b8): undefined reference to `StdDeck'
eval.c:(.text+0x1bd): undefined reference to `GenericDeck_maskString'
eval.c:(.text+0x1de): undefined reference to `StdRules_HandVal_print'
/tmp/ccIerv1Z.o: In function `StdDeck_StdRules_EVAL_N':
eval.c:(.text+0x26c): undefined reference to `nBitsTable'
eval.c:(.text+0x28f): undefined reference to `nBitsTable'
eval.c:(.text+0x29d): undefined reference to `straightTable'
eval.c:(.text+0x2ab): undefined reference to `straightTable'
eval.c:(.text+0x2c8): undefined reference to `topFiveCardsTable'

The include files I have at the top of my code match ones found in
eval, and my calls to various poker-eval functions also coincide with
the 'eval' source code.

I
get similar output when trying to 'gcc -o eval eval.c' from within the
examples directory.  I've read the makefile and can't seem to figure
out what I need to do to compile my own code that includes the
poker-eval functionality

Can you point me towards a url or
document that might help me resolve the compliling issues... I unclear
about how to resolve the references, and have been un-able to find much
useful documentation.

Thanks very much for you efforts, from what i've seen so far the library is 
very impressive, hope to hear from you.

Ryan Barrett                                      
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to