function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
johnyu0520johnyu0520 

[zkSforce] Getting error while compiling with the latest zkSforce

Hello everyone,

 

After following the instructions on http://www.pocketsoap.com/osx/zksforce/ to download the latest version and configure the XML library and build path, I am still getting 6 errors, as shown in the following picture.

 

 

 

Error picture

 

 

 

I have not edited a single line of code for the library, and have not written a single line of code for my project yet.

 

Any help will be greatly appreciated, and thanks in advance!

 

 

Cheers,

John

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

If you're building an iPhone/iPad project, you should not include the zkQueryResult_NSTableView.* files, as they are OSX specific

All Answers

SuperfellSuperfell

If you're building an iPhone/iPad project, you should not include the zkQueryResult_NSTableView.* files, as they are OSX specific

This was selected as the best answer
tschlosstschloss

I am lost with the similar errors.

 

I think my main question is: How can I add the libxml2.dylib to the list of linked libraries? Can't find it in the project preferences.

 

In Xcode I tried it with several predefined project types (Cocoa App) and before with Command Line Tool (Foundation and Core Foundation). 

With the Command Line Tool I had exactly these errors around 10+ times. 

Screenshot http://skitch.com/tschloss/d1y7y/zkqueryresult-nstableview.h-myfirst-build-results

Ok, obviously makes not much sense, because some graphical UI stuff seems to be included

What have I done:

- added all the h and m files to the project

- added a line #import "zkSforce.h" after the import cocoa

- added /usr/include/libxml2 to the header search path

- !! did not find where to point to libxml2.dylib

==> which are the base classes without user interface?

 

When trying with Cocoa Application 

Same thing (added header search path, but did not find how to add the lib to the linker)

Got Linker errors.   http://img.skitch.com/20100814-te93t6ne7r12p1ww1qh2p5s7ik.jpg

==> how to add libxml2.dylib to the linked libraries? (Pretty basic, but sorry, I just start with XCode....)

 

Thanks for hints

Thomas

 

tschlosstschloss

I am a step further now:

In the "Cocoa App" version I found where to add the library libxmls2.dylib.

 

Now I only have one error left - any hints now?

SuperfellSuperfell

I can't reproduce this problem, I have XCode 3.2.2 on OSX 10.6.4, I downloaded zkSforce from http://www.pocketsoap.com/osx/zksforce/ I created a new Mac OSX Cocoa Application from xcode, added all the files from the zip to my project, right clicked on Frameworks -> Other Frameworks, picked add existing framework from the menu, and added libxml2.dylib, then went into the project settings and added /usr/include/libxml2 to the header search path, and then did a build, everything went fine. (I zipped up the project and put it here if you want to look at it)

tschlosstschloss

Thanks for your reply including test :)

 

Strange. But I downloaded your project and will compare it next week.

 

Cheers

Thomas

tschlosstschloss

Hi SimonF,

 

I tried your test project as proposed. 

On one machine (with an Xcode + Libraries a few weeks old): flawless, no warnings - great.

On another machine (Xcode freshly installed yesterday) I received a pair of warnings regarding "zkDescribeField.m": the method "hash" returns unsigned while the same method in the super super class NSObject hashes a NSUInteger. 

But the empty app finally starts and looks fine. I will now have to add some calls to zkSforce.

 

You added the Libxml stuff into the framework section, I added it to the lib section in the target.  I am sure to find out the difference one day.

 

Does somebody know if and where I can find more sample code working with the zkSforce framework? I remember when I started to code with the Perl/CPAN library to SFDC I would have had no chance without some examples due to missing documentation.

 

Thanks

Thomas

SuperfellSuperfell

Maildrop, SF3 & apexmate are all open source projects on google code that use (various versions) of the library. A quick summary is that the ZKSforceClient class is the main entry point, it exposes login and other calls that map directly onto the web services methods. (if you're not familiar with the web services API, then for sure start with the web services docs).