Re: FreeTDS Cocoa Sample?
Re: FreeTDS Cocoa Sample?
- Subject: Re: FreeTDS Cocoa Sample?
- From: "Grigutis, John A" <email@hidden>
- Date: Sat, 12 Sep 2009 02:06:16 -0400
- Acceptlanguage: en-US
- Thread-topic: FreeTDS Cocoa Sample?
On Aug 10, 2009, at 4:34 PM, Robert Mullen wrote:
> I have scoured the archives and the web in general looking for a
> sample XCode project that uses FreeTDS. Does anyone know where one can
> be found or would anyone be kind enough to share some source code with
> me? What I have done so far is to compile FreeTDS 0.82 on my system
> and successfully test it to a SQL Server database via tsql. I have
> added /usr/local/include to my projects header search paths. I then
> import <FreeTDS/sybfront.h> and <FreeTDS/sybdb.h> but when I go to
> compile with just the imports and no code referencing the headers I
> get an error "conflicting types for BOOL." It looks like BOOL is
> conditionally compiled inside sybdb.h and even though the condition is
> not met it seems like the compiler is struggling with it.
>
> Anyway, I have banged my head against this for several steps and am
> wondering if someone has the goods. If not can someone help me past
> this problem?
I'm trying to get this to work as well. Here is what worked for me.
Find this line in your /usr/local/include/sybdb.h file:
#if !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(DOS32X)
replace it with:
#if !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(DOS32X) && !
defined(OBJC_BOOL_DEFINED)
you're telling the compiler to only define BOOL if it has not been
defined elsewhere. But even after doing that I get 23 undefined symbol
errors when I try to compile the sample code:
Undefined symbols:
"_dbbind", referenced from:
_main in FreeTDS Test.o
"_dbcount", referenced from:
_main in FreeTDS Test.o
_main in FreeTDS Test.o
"_dbretstatus", referenced from:
_main in FreeTDS Test.o
"_dbinit", referenced from:
_main in FreeTDS Test.o
"_dbuse", referenced from:
_main in FreeTDS Test.o
"_tdsdbopen", referenced from:
_main in FreeTDS Test.o
"_dblogin", referenced from:
_main in FreeTDS Test.o
"_dbresults", referenced from:
_main in FreeTDS Test.o
"_dbsetlname", referenced from:
_main in FreeTDS Test.o
_main in FreeTDS Test.o
"_dbcollen", referenced from:
_main in FreeTDS Test.o
"_dbmsghandle", referenced from:
_main in FreeTDS Test.o
"_dbclose", referenced from:
_main in FreeTDS Test.o
"_dbnullbind", referenced from:
_main in FreeTDS Test.o
"_dberrhandle", referenced from:
_main in FreeTDS Test.o
"_dbsqlexec", referenced from:
_main in FreeTDS Test.o
"_dbnumcols", referenced from:
_main in FreeTDS Test.o
"_dbwillconvert", referenced from:
_main in FreeTDS Test.o
"_dbnextrow", referenced from:
_main in FreeTDS Test.o
"_dbfcmd", referenced from:
_main in FreeTDS Test.o
"_dbexit", referenced from:
_main in FreeTDS Test.o
"_dbcolname", referenced from:
_main in FreeTDS Test.o
"_dbhasretstat", referenced from:
_main in FreeTDS Test.o
"_dbcoltype", referenced from:
_main in FreeTDS Test.o
ld: symbol(s) not found
So something else is not right. I've configured the project's Header
and Library Search Paths to /usr/local/lib and /usr/local/include
respectively. Any ideas?
--
John Anthony Grigutis
Systems Analyst/Programmer/Mac Specialist
Indiana University : UITS : Communication & Support : SDD
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden