Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7788013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:51:25+00:00 2026-06-01T20:51:25+00:00

Hey I’ve had nonstop problems with SQL. I’m trying to get some experience because

  • 0

Hey I’ve had nonstop problems with SQL. I’m trying to get some experience because I know it’s a vital part of the industry. I got it working with C#, but now I’m working on connecting to a database in c++. I have the project properly linked and what not. Here’s my code and the errors I’m getting.

 #include "stdafx.h"
 #include <mysql.h>
 #include <iostream>
 MYSQL mysql;
 MYSQL_RES result;


using namespace std;
 int _tmain(int argc, _TCHAR* argv[])
 {

    mysql_init(&mysql);

if(!mysql_real_connect(&mysql, "localhost", "root", "*******", "MyDatabse", 0,       NULL, 0))
{
    printf("Failed to connect");
}


return 0;

    }

and the errors:

Error   1   error LNK2001: unresolved external symbol _mysql_real_connect@32    c:\Users\Zack-074\documents\visual studio 2010\Projects\MySql\MySql\MySql.obj
Error   2   error LNK2001: unresolved external symbol _mysql_init@4 c:\Users\Zack-074\documents\visual studio 2010\Projects\MySql\MySql\MySql.obj
Error   3   error LNK1120: 2 unresolved externals   c:\users\zack-074\documents\visual studio 2010\Projects\MySql\Debug\MySql.exe   1

I really appreciate the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T20:51:27+00:00Added an answer on June 1, 2026 at 8:51 pm

    Those are linker errors. In other words, you don’t appear to be having any problem compiling to object files but are running into difficulties when attempting to link those object files into an executable.

    One solution that pops immediately to mind is to manually specify the location and/or name of the library you wish to link against. In VS2010, right-click on the project you’re working on and select Properties. From there, open up the linker options and specify the directory in which the library you want to link against.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey having some trouble trying to maintain transparency on a png when i create
Hey, I'm trying to get the source code of an app similar to the
Hey, I'm trying to figure out if it's possible to overload a template class
Hey I'm trying to return a message when there are no results for the
Hey guys I was wondering if there is a way to get a certain
Hey I can't figure out an error I got. I had my App working
Hey everyone I am a newbie and would love some help. I got the
Hey guys, sorry I'm kind of new to programming, but I had a small
Hey, I'm using Levenshteins algorithm to get distance between source and target string. also
Hey all. Newbie question time. I'm trying to setup JMXQuery to connect to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.