|
-
February 10th, 2007, 01:44 PM
#1
Lib LNK2001 why?
hi all ! Im trying to compile a project and everything works fine, now Im adding a new lib for handling a database. I got the files from http://www.sqlite.org/
all Im trying to do is this :
Code:
#include "sqlite3.h" //DB
Player::LoadPlayerDataDB()
{
#pragma comment (lib, "lib/sqlite.lib") /* link with Microsoft OpenGL lib */
sqlite3 *db;
char *zErrMsg = 0;
int rc;
const char *sqlite3_libversion(void);
const char *filename="/Database/player.db";
rc = sqlite3_open(filename, &db);
if( rc ){
sqlite3_close(db);
exit(1);
}
But I get the link error, the thing is that I ave worked with Libs before and I actually use some atm and I had no probs, I added the lib to my project and all but still have the same error.
Any help is appreciated.
THanks!
-
February 11th, 2007, 06:58 AM
#2
Re: Lib LNK2001 why?
Can you post the full link error ?
Or perhaps you move the
Code:
#pragma comment (lib, "lib/sqlite.lib") /* link with Microsoft OpenGL lib */'
to your header file . ( I'm not sure if this will fix your problem ).
Please use code tags [code] [/code]
We would change the world, but God won't give us the sourcecode.. 
Undocumented futures are fun and useful....
_________
Gili
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|