IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label x8664. Show all posts
Showing posts with label x8664. Show all posts

Friday, January 25, 2013

Undefined symbols for architecture x86_64

I'm trying to run following code in mac os x mount lion (64 bit) but the curl library is not designed for same.

Please help how can i run this

 

C++ Application Code

 

#include

#include

#include

#include

size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) {

    size_t written;

    written = fwrite(ptr, size, nmemb, stream);

    return written;

}

 

int main() {

    std::string tempname = "temp";

    CURL *curl;

    CURLcode res;

    curl = curl_easy_init();

    if(curl) {

        FILE *fp = fopen(tempname.c_str(),"wb");

        curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");

        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);

        curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);

        res = curl_easy_perform(curl);

        curl_easy_cleanup(curl);

        fclose(fp);

        fp = fopen(tempname.c_str(),"rb");

        fseek (fp , 0 , SEEK_END);

        long lSize = ftell (fp);

        rewind(fp);

        char *buffer = new char[lSize+1];

        fread (buffer, 1, lSize, fp);

        buffer[lSize] = 0;

        fclose(fp);

        std::string content(buffer);

        delete [] buffer;

    }

}

 

Error:

 

Undefined symbols for architecture x86_64:

  "_curl_easy_cleanup", referenced from:

      _main in main.o

  "_curl_easy_init", referenced from:

      _main in main.o

  "_curl_easy_perform", referenced from:

      _main in main.o

  "_curl_easy_setopt", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


View the original article here

Undefined symbols for architecture x86_64

I'm trying to run following code in mac os x mount lion (64 bit) but the curl library is not designed for same.

Please help how can i run this

 

C++ Application Code

 

#include

#include

#include

#include

size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) {

    size_t written;

    written = fwrite(ptr, size, nmemb, stream);

    return written;

}

 

int main() {

    std::string tempname = "temp";

    CURL *curl;

    CURLcode res;

    curl = curl_easy_init();

    if(curl) {

        FILE *fp = fopen(tempname.c_str(),"wb");

        curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com");

        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);

        curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);

        res = curl_easy_perform(curl);

        curl_easy_cleanup(curl);

        fclose(fp);

        fp = fopen(tempname.c_str(),"rb");

        fseek (fp , 0 , SEEK_END);

        long lSize = ftell (fp);

        rewind(fp);

        char *buffer = new char[lSize+1];

        fread (buffer, 1, lSize, fp);

        buffer[lSize] = 0;

        fclose(fp);

        std::string content(buffer);

        delete [] buffer;

    }

}

 

Error:

 

Undefined symbols for architecture x86_64:

  "_curl_easy_cleanup", referenced from:

      _main in main.o

  "_curl_easy_init", referenced from:

      _main in main.o

  "_curl_easy_perform", referenced from:

      _main in main.o

  "_curl_easy_setopt", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


View the original article here