Hey guys Im writing a app to upload files to my webserver so when i save a file locally it will upload when i open the app. Ive searched the internet for uploading libraries but none of them seem to work can someone shed a little light on this for me and maybe link me to some good libraries. Any help would be greatly appreciated. Thanks Cyb3r.

Recommended Answers

All 3 Replies

There is a free FTP client source code here (scroll down to Socket Class section) Just download (free) the whole library and you will have it with examples.

#include <iostream>
#include <CkUpload.h>

using namespace std;

void ChilkatSample(void)
{

    CkUpload upload;

    //  Specify the page (ASP, ASP.NET, Perl, Python, Ruby, CGI, etc)
    //  that will process the HTTP Upload.
    upload.put_Hostname("www.freeupload.com");
    upload.put_Path("/freeaspupload/testUpload.asp");

    //  Add one or more files to be uploaded.
    upload.AddFileReference("file1","dude.gif");
    upload.AddFileReference("file2","pigs.xml");
    upload.AddFileReference("file3","sample.doc");

    //  Do the upload.  The method returns when the upload
    //  is completed.
    //  This component also includes asynchronous upload capability,
    //  which is demonstrated in another example.
    bool success;
    success = upload.BlockingUpload();
    if (success != true) {
        printf("%s\n",upload.lastErrorText());
    }
    else {
        printf("Files uploaded!\n");
    }

}

I found this script at but I cant seem to get it to work I keep getting the following errors.
[Linker error] undefined reference to `CkUpload::CkUpload()'
[Linker error] undefined reference to `CkUpload::put_Hostname(char const*)'
[Linker error] undefined reference to `CkUpload::put_Path(char const*)'
[Linker error] undefined reference to `CkUpload::AddFileReference(char const*, char const*)'
[Linker error] undefined reference to `CkUpload::AddFileReference(char const*, char const*)'
[Linker error] undefined reference to `CkUpload::AddFileReference(char const*, char const*)'
[Linker error] undefined reference to `CkUpload::BlockingUpload()'
[Linker error] undefined reference to `CkUpload::lastErrorText()'
[Linker error] undefined reference to `CkUpload::~CkUpload()'
[Linker error] undefined reference to `CkUpload::~CkUpload()'
ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Upload.exe] Error 1

Im really stuck on this do you guys have any insight on this?

you are missing the implementation file of that class, most likely in CkUpload.cpp

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.