473,396 Members | 1,836 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems with libcurl on Visual C++ Express Edition


I am trying to use libcurl with Visual C++ 2005 Express Edition. I
downloaded the file from here:
http://curl.haxx.se/dlwiz/?type=lib&...&ver=2000%2FXP
It is the 7.16.0 version of the library. The 'lib' subdiretory
contains following files:
libcurl-4.dll
libcurl.la
libcurl.a
libcurl.dll.a
I added the 'include' subdirectory to the include path of the project
(VS sees the 'curl.h' file) and the libcurl.dll.a to the Linker-
>Additional Dependencies so that the linker does its job (with one
warning however:
Linking...
libcurl.dll.a(d000116.o) : warning LNK4078: multiple '.text' sections
found with different attributes (E0000020)
My program is very simple, it goes like this:
#include <code/code.h>
#include <iostream>
using namespace std;

int main(){
const char* url = "www.wp.pl";
curl_global_init( CURL_GLOBAL_WIN32);
CURL* context = curl_easy_init();
if(context == NULL){
cout << "Unable to initialize cURL interface" << endl;
return -1;
}
curl_easy_setopt(context, CURLOPT_URL, url);
curl_easy_setopt(context, CURLOPT_WRITEHEADER, stdout);
curl_easy_setopt(context, CURLOPT_WRITEDATA, stdout);
const CURLcode rc = curl_easy_perform(context);
if( rc != CURLE_OK )
cout << "Error performing" << endl;
else{
double statDouble;
if( CURLE_OK == curl_easy_getinfo(context, CURLINFO_HTTP_CODE,
&statLong))
cout << "Response code: " << statLong << endl;
}
curl_easy_cleanup(context);
curl_global_cleanup();
return 0;
}
However, when I run the program it crashes without saying anything
('There was a problem with the application and it will be closed"). I
figured that it appears along with the call of the function
curl_global_init(). Any ideas on how to solve it? Thanks in advance.

Przemek

Feb 12 '07 #1
2 5028
* bo*****@gmail.com:
I am trying to use libcurl with Visual C++ 2005 Express Edition. I
downloaded the file from here:
http://curl.haxx.se/dlwiz/?type=lib&...&ver=2000%2FXP
It is the 7.16.0 version of the library. The 'lib' subdiretory
contains following files:
libcurl-4.dll
libcurl.la
libcurl.a
libcurl.dll.a
I added the 'include' subdirectory to the include path of the project
(VS sees the 'curl.h' file) and the libcurl.dll.a to the Linker-
>Additional Dependencies so that the linker does its job (with one
warning however:
Linking...
libcurl.dll.a(d000116.o) : warning LNK4078: multiple '.text' sections
found with different attributes (E0000020)
[libcurl.dll.a] is probably a g++ import library. g++ uses the COFF
format which also Visual C++ uses, so there is some shared ground, but
the details are different. Ungood to mix. You need libraries built for
Visual C++. C++ has no standard, common binary format.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Feb 13 '07 #2
bo*****@gmail.com wrote:
I am trying to use libcurl with Visual C++ 2005 Express Edition. I
downloaded the file from here:
[..snip..]

However, when I run the program it crashes without saying anything
('There was a problem with the application and it will be closed"). I
figured that it appears along with the call of the function
curl_global_init(). Any ideas on how to solve it? Thanks in advance.
Wrong newsgroup. C++ language does not define what 'libcurl' is or
how to work with it. You probably need to contact the newsgroup
where it would be on topic (the ng for your OS, maybe?)

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Feb 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: clintonG | last post by:
Visual C# 2005 Express Edition is a simple, lightweight, integrated development environment designed for beginning programmers and non-professional developers interested in building Windows Forms,...
0
by: Maury | last post by:
I just downloaded .Net Framework Beta2 and Visual Web Developer Express Edition Beta and Visual C# Express Edition. I installed .Net Framework Beta2, then I installed Visual Web Developer...
1
by: QLD_AU | last post by:
Has anyone see the following error ? VS 2005 Installs ok, however the SQL Mobile Edition (part of a full install) fails with the following error ? With Thanks Jason
4
by: Andrew Robinson | last post by:
My main dev machine has WinXp and VS2005 (pro). 1. I need to install VWD Express Edition so that I can do some instruction on this. Any issues with both on the same machine. Installation order?...
2
by: Progman | last post by:
I have Visual Studio 2005 Standard edition. Is ti the same thing as the Express edition or Standard is more?
6
by: Simon Brown | last post by:
Hi, I am considering buying Visual Studio Standard Edition and have these questions about the VC++ incuded. Could you also, to help me know the diffrene in capablility, answer the same questions...
1
by: Ruth | last post by:
Which edition of Visual Studio do I have? "About" says that I have Visual Studio 8.0.5.0727.42: is this the professional, express, or enterprise edition? I do not believe it is the Team edition....
45
by: mistral | last post by:
Does Visual C++ 2005 Express Edition produce small, compact C executables? Or there is another C compilers that do this better? m.
1
by: Dr T | last post by:
Hi! I downloaded MS Visual Web Developer 2005 Express Edition, MS .NET Framework SDK v2.0, and MS SQL Server 2005. Subsequently, I bought MS Visual Studio 2005 Professional Edition. 1) Are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.