Linker Error Undefined Reference To Internetopena 20
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to fix this error: undefined reference to `__imp_InternetOpenA' up vote 1 down vote favorite I want make C++ program where send .txt file with information to my PC. I surch so much in internet but cant find method that works. When I uusing Dev C++ give me this errors: ...: undefined reference to __imp_InternetOpenA' ...: undefined reference to__imp_InternetConnectA' ...: undefined reference to __imp_FtpPutFileA' ...: undefined reference to__imp_HttpOpenRequestA' Here are three examples where I find, but all return this error.
#include#include #include #include #include #pragma comment(lib,"wininet.lib") #define ERROR_OPEN_FILE 10 #define ERROR_MEMORY 11 #define ERROR_SIZE 12 #define ERROR_INTERNET_OPEN 13 #define ERROR_INTERNET_CONN 14 #define ERROR_INTERNET_REQ 15 #define ERROR_INTERNET_SEND 16 using namespace std; int main() { // Local variables char filename[] = "file"; //Filename to be loaded char filepath[] = "d:\\a.jpg"; //Filename to be loaded char type[] = "image/jpeg"; char boundary[] = "--BOUNDARY---"; //Header boundary char nameForm[] = "formname"; //Input form name char iaddr[] = "localhost"; //IP address char url[] = "/http/file.php"; //URL char hdrs[512]={'-'}; //Headers char * buffer; //Buffer containing file + headers char * content; //Buffer containing file FILE * pFile; //File pointer long lSize; //File size size_t result; // Open file pFile = fopen ( filepath , "rb" ); if (pFile==NULL) { printf("ERROR_OPEN_FILE"); getchar(); return ERROR_OPEN_FILE; } printf("OPEN_FILE\n"); // obtain file size: fseek (pFile , 0 , SEEK_END); lSize = ftell (pFile); rewind (pFile); // allocate memory to contain the whole file: content = (char*) malloc (sizeof(char)*lSize); if (content == NULL) { printf("ERROR_MEMORY"); getchar(); return ERROR_OPEN_FILE; } printf("MEMORY_ALLOCATED\t \"%d\" topic ForumsMembersHelp Files Developer Journals Gallery Calendar Downloads Resources Store Classifieds Tracker Links Home For Beginners Articles All Articles Post an Article Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL and Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile Development Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Music and Sound Visual Arts Business Breaking into the Industry Production and Management Interviews Business and Law Event Coverage Forums All Forums Technical Game Programming General Programming Graphics Programming and Theory DirectX http://stackoverflow.com/questions/22887372/how-to-fix-this-error-undefined-reference-to-imp-internetopena and XNA OpenGL & Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile & Console Development Build Systems & Source Control Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Writing For Games Music and Sound Visual Arts Gallery Business Breaking into the Industry Business & Law Production & Management Community GDNet Lounge Coding Horrors Article Writing Comments, Suggestions and Ideas http://www.gamedev.net/topic/226666-dev-c-linker-error-undefined-reference-to-internetopena20/ Your Announcements Hobby Project Classifieds Indie Project Showcase Community Developer Journals Gallery Classifieds Jobs Freelancers Hobby Projects GDNet+ Membership Store Marketplace Newsletter » Home » Forums » The Technical Side » For Beginners Chat Watched Content New Content Dev-C++ [Linker error] undefined reference to `InternetOpenA@20... Started by Gultipaka, May 21 2004 06:42 AM Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. You cannot reply to this topic 2 replies to this topic #1 Gultipaka Members -Reputation: 122 Like Likes Like Posted 21 May 2004 - 06:42 AM While trying to compile my program I recieve this message [Linker error] undefined reference to `InternetOpenA@20 [Linker error] undefined reference to `InternetConnect@.. There is a piece of my code ====================================================== HINSTANCE hLib = NULL; hLib = LoadLibrary("wininet.dll"); HINTERNET hInternetSession; HINTERNET hURL; // Make internet connection. hInternetSession = InternetOpen( "Programm", // agent INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); // Make connection to desired page. hURL = InternetOpenUrl( hInternetSession, "http://www.page.com/", NULL, 0, 0, 0); ====================================================== Back to top #2 try_catch_this Members -Reputati
topic ForumsMembersHelp Files Developer Journals Gallery Calendar Downloads Resources Store Classifieds Tracker Links Home For Beginners http://www.gamedev.net/topic/508740-need-help-with-c/ Articles All Articles Post an Article Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL and Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile Development Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Music and Sound Visual Arts Business Breaking into the Industry Production linker error and Management Interviews Business and Law Event Coverage Forums All Forums Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL & Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile & Console Development Build Systems & Source Control Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design linker error undefined Writing For Games Music and Sound Visual Arts Gallery Business Breaking into the Industry Business & Law Production & Management Community GDNet Lounge Coding Horrors Article Writing Comments, Suggestions and Ideas Your Announcements Hobby Project Classifieds Indie Project Showcase Community Developer Journals Gallery Classifieds Jobs Freelancers Hobby Projects GDNet+ Membership Store Marketplace Newsletter » Home » Forums » The Technical Side » For Beginners Chat Watched Content New Content 0 Need help with C++ Started by tigmon, Sep 18 2008 08:53 AM Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. You cannot reply to this topic 3 replies to this topic #1 tigmon Members -Reputation: 122 Like 0Likes Like Posted 18 September 2008 - 08:53 AM Hello everyone I am a noob to C++ but not programming in general. I'm trying to w