×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

LNK 1104 error please help

LNK 1104 error please help

LNK 1104 error please help

(OP)
I have been all over the place with this and I can't seem to get past the linker errors, and this last one is getting to me

fatal error LNK1104: cannot open file 'C:\Program Files\MySQL\MySQL Server 5.5\lib\\.obj'

here is the code:

CODE

// Test2.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <Windows.h>
#include <stdio.h>
#include <urlmon.h>
#include <iostream>
#include <tchar.h>
#include <fstream>
#include <string>
#include <sqlext.h>

#include <stdlib.h>
#include <stddef.h>

#include <winsock.h>
#include <cstdio>
#include <mysql.h>

#pragma comment (lib, "urlmon.lib")
//#pragma comment (lib, "libmysql.lib")
using namespace std;
void ProcsLink(string plink);
string Team_Name(string team);
string PName(string name);
void Playerfunc();

int _tmain(int argc, _TCHAR* argv[])
{
    system("del LivePlayers.txt");
    Playerfunc();
    system("del testA.txt");
    system("del testB.txt");


    // create a pointer of the type mysql
MYSQL *conn;
// initialize your mysql connection
conn = mysql_init(NULL);
// connect to your database
mysql_real_connect(conn,"localhost","username","password","database",0,NULL,0);
// perform a query
mysql_query(conn,"UPDATE my_table SET somevalue = somevalue + 1 WHERE id = 5");
// close the connection
mysql_close(conn);
}
This has been driving me nuts I have include the lib and include from mysql folder, so what is going on?

Also I have quoted the folder name with spaces in it, albiet there is not a obj file in that directory.

if I removed that entry i get

CODE

1>Test2.obj : error LNK2019: unresolved external symbol _mysql_close@4 referenced in function _main
1>Test2.obj : error LNK2019: unresolved external symbol _mysql_query@8 referenced in function _main
1>Test2.obj : error LNK2019: unresolved external symbol _mysql_real_connect@32 referenced in function _main
1>Test2.obj : error LNK2019: unresolved external symbol _mysql_init@4 referenced in function _main
1>C:\Users\Sasuke\documents\visual studio 2010\Projects\Test2\Debug\Test2.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
so what do i do now?

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close