[Tcbug] Re: [X-Unix] Re: [PB] Compiling on MacOS X (source was written for winblow...) [moved from PB]

Eric F Crist ecrist at secure-computing.net
Sun Nov 26 16:34:02 PST 2006


On Nov 26, 2006, at 4:44 PM, Eric F Crist wrote:

> On Nov 26, 2006, at 1:43 PM, Josh Paetzel wrote:
>
> [snip]
>
>>> So that some of you may see what I'm dealing with, you can download
>>> the source I'm working with at the following location:
>>>
>>> http://www.secure-computing.net/~ecrist/gts-core-src.tar
>>>
>>> All the mysql*.h files you see were put there by me to try and get
>>> this damn thing to compile.
>>>
>>> Thanks for all the help.
>>>
>>> -----
>>> Eric F Crist
>>> Secure Computing Networks
>>>
>>
>> Well.....here's what I did to make it go.
>>
>> --- GBMuploader.c.old   Sun Nov 26 13:37:44 2006
>> +++ GBMuploader.c       Sun Nov 26 13:38:35 2006
>> @@ -10,7 +10,9 @@
>>  #include <stdio.h>
>>  #include <string.h>
>>  #include <stdlib.h>
>> -#include "mysql.h"
>> +#include <my_global.h>
>> +#include <my_sys.h>
>> +#include <mysql.h>
>>
>>  //banker structure
>>  struct banker {
>>
>> and then....
>>
>> # gcc -o
>> test -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lm -I/usr/ 
>> local/include/mysql
>> *.c
>>
>> mysql_config --cflags and mysql_config --libs are handy little tools
>> for determining what sorts of goo you need to compile stuff that
>> includes mysql stuffs.
>>
>> -- 
>> Thanks,
>>
>> Josh Paetzel
>
> Is this going to work on Mac OS X?
>
> -----
> Eric F Crist
> Secure Computing Networks

Here's what I did on Mac OS X:

1) copied the entirety of mysql's include directory to my build  
directory on my local machine.  Then, I typed the following and got  
the posted results:

Swordfish:/Applications/World of Warcraft/Interface/AddOns/GTS_Core/ 
apps/src ecrist$ gcc -o test -L/sw/lib/mysql -lmysqlclient -lz - 
lcrypt -lm -I/Applications/World\ of\ Warcraft/Interface/AddOns/ 
GTS_Core/apps/src *.c
/usr/bin/ld: can't locate file for: -lmysqlclient
collect2: ld returned 1 exit status
Swordfish:/Applications/World of Warcraft/Interface/AddOns/GTS_Core/ 
apps/src ecrist$

I think we're making headway.


-----
Eric F Crist
Secure Computing Networks




More information about the X-Unix mailing list