#include "stdafx.h"
#include<iostream>
#include<string.h>
#include<fstream>
#include<stdio.h>
#include<cstdio>
#include<curl\curl.h>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	return 0;
}

void main()
{    
	int p;
	CURL* curl;
	curl=curl_easy_init();  
}

The above is my code and I am trying to compile it in vc++ 10.But the error is:
error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function _main


I have included the header files in additional include directories.I have also added the library folder to file to additional library directories.I have entered the name of library in Linker-> Input ->Dependencies. And yet this error seems to come.
Please help....

Recommended Answers

All 2 Replies

Get rid of lines 10-13, you can't have two mains.

Change line 15 to int main() as per the standard.

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.