Więc tak. Zainstalowałem curla tak jak pisało tutaj: http://forum.ddt.pl/?Tid=83 . Niestety coś nie działa:
Oto kod programu:
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <curl.h>
using namespace std;
int main(int argc, char *argv[])
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://allegro.pl/");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
system("PAUSE");
return EXIT_SUCCESS;
}
A tutaj plik makefile.win pokazujący się po kompilacji - linijka "-l winmm" podświetla się na czerwono :
# Project: Projekt1
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"C:/Dev-Cpp/lib" -l curl
-l winmm
-l ssl
-l crypto
-l z
-l gdi32
-l ws2_32
INCS = -I"C:/Dev-Cpp/include"
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
BIN = Projekt1.exe
CXXFLAGS = $(CXXINCS) -DCURL_STATICLIB
CFLAGS = $(INCS) -DCURL_STATICLIB
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before Projekt1.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Projekt1.exe" $(LIBS)
main.o: main.cpp
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
Co robić ??