Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

Where can I find sample code in c + +?


  • Please log in to reply
8 replies to this topic

#1 pjh4560

pjh4560

  • Pip
  • Title: Member
  • Group: Members
  • 6 posts

Posted 17 July 2012 - 08:15 AM

Hello

Windows7
Visual Studio 2010 c + +

Program is making on the environment.

Where can I find sample code for example?

#2 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 406 posts

Posted 18 July 2012 - 05:57 PM

You might want to follow this thread

#3 pjh4560

pjh4560

  • Pip
  • Title: Member
  • Group: Members
  • 6 posts

Posted 23 July 2012 - 08:08 AM

I do not know apache thriftf.

c + + API and sample code that works with apache thriftf please

#4 Rambus

Rambus

  • Pip
  • Title: Member
  • Group: Members
  • 21 posts

Posted 23 July 2012 - 07:15 PM

The Evernote guys wrote a single API in thrift, and thrift generates the corresponding C++ (or PHP, Java, etc) code for developers to use.

My example C++ project should exactly match your needs. I was delayed in releasing it, but I will try to find some time this weekend to wrap it up for you.

Stay tuned!

#5 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 406 posts

Posted 23 July 2012 - 07:34 PM

You can also get started with our API by downloading our librairies from our github repository.

#6 Rambus

Rambus

  • Pip
  • Title: Member
  • Group: Members
  • 21 posts

Posted 23 July 2012 - 09:03 PM

Yes, to clarify my earlier post:

The Evernote libraries (Juliens link) are already converted to C++ code / An appropriate library. You do not need to run thrift on the definition files to create the CPP/H files.
I'm simply planning on providing an example MSVC/QT project with some of the lessons I learned working with Evernote integrated in it.

#7 pjh4560

pjh4560

  • Pip
  • Title: Member
  • Group: Members
  • 6 posts

Posted 24 July 2012 - 06:34 AM

Rambus



I do not know English

Do not get me wrong, the sentence is strange

Is the sample code that generates the notes?

Can be downloaded on next Monday?

#8 Rambus

Rambus

  • Pip
  • Title: Member
  • Group: Members
  • 21 posts

Posted 24 July 2012 - 02:36 PM

The evernote API can be downloaded here: https://github.com/e...vernote-sdk-cpp
One example C++ program is here: http://www.peoplesnote.org/ (with source code)
I will try to finish my example program this weekend.

#9 pjh4560

pjh4560

  • Pip
  • Title: Member
  • Group: Members
  • 6 posts

Posted 30 July 2012 - 05:09 AM

boost::shared_ptr<TSSLSocketFactory> sslSocketFactory(new TSSLSocketFactory());
boost::shared_ptr<TSSLSocket> sslSocket = sslSocketFactory->createSocket(EVERNOTE_HOST, 433);
boost::shared_ptr<TBufferedTransport> bufferedTransport(new TBufferedTransport(sslSocket));
boost::shared_ptr<TTransport> userStoreTransport(new THttpClient(bufferedTransport,EVERNOTE_HOST));

userStoreTransport->open();


Error :

1>------ 빌드 시작: 프로젝트: AldisNoteTest2, 구성: Debug Win32 ------
1>AldisNote.obj : error LNK2019: "public: __thiscall apache::thrift::transport::THttpClient::THttpClient(class boost::shared_ptr<class apache::thrift::transport::TTransport>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0THttpClient@transport@thrift@apache@@QAE@V?$shared_ptr@VTTransport@transport@thrift@apache@@@boost@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 외부 기호(참조 위치: _evernoteAlimSend 함수)에서 확인하지 못했습니다.
1>AldisNote.obj : error LNK2019: "public: __thiscall apache::thrift::transport::TSSLSocketFactory::TSSLSocketFactory(void)" (??0TSSLSocketFactory@transport@thrift@apache@@QAE@XZ) 외부 기호(참조 위치: _evernoteAlimSend 함수)에서 확인하지 못했습니다.
1>AldisNote.obj : error LNK2001: "public: virtual void __thiscall apache::thrift::transport::TBufferedTransport::flush(void)" (?flush@TBufferedTransport@transport@thrift@apache@@UAEXXZ) 외부 기호를 확인할 수 없습니다.
1>AldisNote.obj : error LNK2001: "public: virtual unsigned int __thiscall apache::thrift::transport::TBufferedTransport::readSlow(unsigned char *,unsigned int)" (?readSlow@TBufferedTransport@transport@thrift@apache@@UAEIPAEI@Z) 외부 기호를 확인할 수 없습니다.
1>AldisNote.obj : error LNK2001: "public: virtual void __thiscall apache::thrift::transport::TBufferedTransport::writeSlow(unsigned char const *,unsigned int)" (?writeSlow@TBufferedTransport@transport@thrift@apache@@UAEXPBEI@Z) 외부 기호를 확인할 수 없습니다.
1>AldisNote.obj : error LNK2001: "public: virtual unsigned char const * __thiscall apache::thrift::transport::TBufferedTransport::borrowSlow(unsigned char *,unsigned int *)" (?borrowSlow@TBufferedTransport@transport@thrift@apache@@UAEPBEPAEPAI@Z) 외부 기호를 확인할 수 없습니다.
1>C:\Documents and Settings\Administrator\My Documents\Visual Studio 2010\Projects\AldisNoteTest2\Debug\AldisNoteTest2.dll : fatal error LNK1120: 6개의 확인할 수 없는 외부 참조입니다.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote