Jump to content

TrinityCore Build Error cannot open input file '..\database\Release\database.lib'


Recommended Posts

Hello i am very new to all of this and im having some trouble during the actual build process. I love world of warcraft and have played since launch but never knew there was such an in depth modding community and would love to learn to code C++ and manipulate my own version of Azeroth; thus my reasoning for all of this and i have done well up too this point with conquering most issues. This is the first really big wall, I am using Visual Studios 16 2019 I also do have the Visual Studio 14 2015 installed and available. My issue is at the completion of the build i get this error.

23>LINK : fatal error LNK1181: cannot open input file '..\database\Release\database.lib'
23>Done building project "worldserver.vcxproj" -- FAILED.
24>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
24>Building Custom Rule C:/Trinity/Source/CMakeLists.txt
========== Build: 21 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

I am very new to this and read somewhere it may be something to do with "linking"? I need help i don't think i have missed any steps i even have all the DLL.s ready to go and the database sitting in wait.
Everything builds properly but there is nothing but the extractors in my Build/bin/release/ .

I have tried to delete both build and source folders and restart multiple times, i have tried to use the Visual studios 14 2015 instead but get the same error. I have done the entire process from pulling the source to the build 4 times over now but have not had success. This is the GitHub Ext i am using - https://github.com/TrinityCore/TrinityCore 

I have only recently downloaded all the required tools and as such they should all be up to date i tried to follow the guides to make sure i had the proper versions but ran into errors since files have been updated to upgraded all programs that required it.

I am compiling everything as x64 as that is my windows version. I  can provide more  details if needed.

EDIT++

I installed SSL 32 aswell and it seems to have made a difference i also reinstalled the newest version of MYSQL 5.7 now i am getting a different error though I have seen this error in another thread but the images posted for it are no longer reachable via the links. I apologize as i do not know how to post directly from visual studios.... this is the error message i am getting now it is long.

23>   Creating library C:/Trinity/Build/src/server/worldserver/Release/worldserver.lib and object C:/Trinity/Build/src/server/worldserver/Release/worldserver.exp
23>database.lib(MySQLThreading.obj) : error LNK2019: unresolved external symbol mysql_server_init referenced in function "void __cdecl MySQL::Library_Init(void)" (?Library_Init@MySQL@@YAXXZ)
23>database.lib(MySQLThreading.obj) : error LNK2019: unresolved external symbol mysql_server_end referenced in function "void __cdecl MySQL::Library_End(void)" (?Library_End@MySQL@@YAXXZ)
23>database.lib(DatabaseWorkerPool.obj) : error LNK2019: unresolved external symbol mysql_get_client_info referenced in function "public: __cdecl DatabaseWorkerPool<class CharacterDatabaseConnection>::DatabaseWorkerPool<class CharacterDatabaseConnection>(void)" (??0?$DatabaseWorkerPool@VCharacterDatabaseConnection@@@@QEAA@XZ)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_get_client_info
23>database.lib(DatabaseWorkerPool.obj) : error LNK2019: unresolved external symbol mysql_get_client_version referenced in function "public: __cdecl DatabaseWorkerPool<class CharacterDatabaseConnection>::DatabaseWorkerPool<class CharacterDatabaseConnection>(void)" (??0?$DatabaseWorkerPool@VCharacterDatabaseConnection@@@@QEAA@XZ)
23>database.lib(DatabaseWorkerPool.obj) : error LNK2019: unresolved external symbol mysql_thread_safe referenced in function "public: __cdecl DatabaseWorkerPool<class CharacterDatabaseConnection>::DatabaseWorkerPool<class CharacterDatabaseConnection>(void)" (??0?$DatabaseWorkerPool@VCharacterDatabaseConnection@@@@QEAA@XZ)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_fetch_fields referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_fetch_fields
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_error referenced in function "public: bool __cdecl ResultSet::NextRow(void)" (?NextRow@ResultSet@@QEAA_NXZ)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_error
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_free_result referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_free_result
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_fetch_row referenced in function "public: bool __cdecl ResultSet::NextRow(void)" (?NextRow@ResultSet@@QEAA_NXZ)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_fetch_lengths referenced in function "public: bool __cdecl ResultSet::NextRow(void)" (?NextRow@ResultSet@@QEAA_NXZ)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_fetch referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_store_result referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_bind_result referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_free_result referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_error referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_stmt_error
23>database.lib(QueryResult.obj) : error LNK2019: unresolved external symbol mysql_stmt_num_rows referenced in function "public: __cdecl PreparedResultSet::PreparedResultSet(struct MySQLStmt *,struct MySQLResult *,unsigned __int64,unsigned int)" (??0PreparedResultSet@@QEAA@PEAUMySQLStmt@@PEAUMySQLResult@@_KI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2001: unresolved external symbol mysql_stmt_num_rows
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_field_count referenced in function "public: bool __cdecl MySQLConnection::_Query(char const *,struct MySQLResult * *,struct MySQLField * *,unsigned __int64 *,unsigned int *)" (?_Query@MySQLConnection@@QEAA_NPEBDPEAPEAUMySQLResult@@PEAPEAUMySQLField@@PEA_KPEAI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_affected_rows referenced in function "public: bool __cdecl MySQLConnection::_Query(char const *,struct MySQLResult * *,struct MySQLField * *,unsigned __int64 *,unsigned int *)" (?_Query@MySQLConnection@@QEAA_NPEBDPEAPEAUMySQLResult@@PEAPEAUMySQLField@@PEA_KPEAI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_errno referenced in function "public: bool __cdecl MySQLConnection::Execute(class PreparedStatementBase *)" (?Execute@MySQLConnection@@QEAA_NPEAVPreparedStatementBase@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_set_character_set referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_init referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_real_connect referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_query referenced in function "public: bool __cdecl MySQLConnection::Execute(char const *)" (?Execute@MySQLConnection@@QEAA_NPEBD@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_store_result referenced in function "public: bool __cdecl MySQLConnection::_Query(char const *,struct MySQLResult * *,struct MySQLField * *,unsigned __int64 *,unsigned int *)" (?_Query@MySQLConnection@@QEAA_NPEBDPEAPEAUMySQLResult@@PEAPEAUMySQLField@@PEA_KPEAI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_ping referenced in function "public: void __cdecl MySQLConnection::Ping(void)" (?Ping@MySQLConnection@@QEAAXXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_get_server_info referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_get_server_version referenced in function "protected: unsigned int __cdecl MySQLConnection::GetServerVersion(void)const " (?GetServerVersion@MySQLConnection@@IEBAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_options referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_real_escape_string referenced in function "public: unsigned __int64 __cdecl MySQLConnection::EscapeString(char *,char const *,unsigned __int64)" (?EscapeString@MySQLConnection@@QEAA_KPEADPEBD_K@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_init referenced in function "protected: void __cdecl MySQLConnection::PrepareStatement(unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum ConnectionFlags)" (?PrepareStatement@MySQLConnection@@IEAAXIAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4ConnectionFlags@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_prepare referenced in function "protected: void __cdecl MySQLConnection::PrepareStatement(unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum ConnectionFlags)" (?PrepareStatement@MySQLConnection@@IEAAXIAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4ConnectionFlags@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_execute referenced in function "public: bool __cdecl MySQLConnection::Execute(class PreparedStatementBase *)" (?Execute@MySQLConnection@@QEAA_NPEAVPreparedStatementBase@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_bind_param referenced in function "public: bool __cdecl MySQLConnection::Execute(class PreparedStatementBase *)" (?Execute@MySQLConnection@@QEAA_NPEAVPreparedStatementBase@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_close referenced in function "protected: void __cdecl MySQLConnection::PrepareStatement(unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum ConnectionFlags)" (?PrepareStatement@MySQLConnection@@IEAAXIAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4ConnectionFlags@@@Z)
23>database.lib(MySQLPreparedStatement.obj) : error LNK2001: unresolved external symbol mysql_stmt_close
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_result_metadata referenced in function "public: bool __cdecl MySQLConnection::_Query(class PreparedStatementBase *,class MySQLPreparedStatement * *,struct MySQLResult * *,unsigned __int64 *,unsigned int *)" (?_Query@MySQLConnection@@QEAA_NPEAVPreparedStatementBase@@PEAPEAVMySQLPreparedStatement@@PEAPEAUMySQLResult@@PEA_KPEAI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_stmt_field_count referenced in function "public: bool __cdecl MySQLConnection::_Query(class PreparedStatementBase *,class MySQLPreparedStatement * *,struct MySQLResult * *,unsigned __int64 *,unsigned int *)" (?_Query@MySQLConnection@@QEAA_NPEAVPreparedStatementBase@@PEAPEAVMySQLPreparedStatement@@PEAPEAUMySQLResult@@PEA_KPEAI@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_autocommit referenced in function "public: virtual unsigned int __cdecl MySQLConnection::Open(void)" (?Open@MySQLConnection@@UEAAIXZ)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_more_results referenced in function "public: class PreparedResultSet * __cdecl MySQLConnection::Query(class PreparedStatementBase *)" (?Query@MySQLConnection@@QEAAPEAVPreparedResultSet@@PEAVPreparedStatementBase@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_next_result referenced in function "public: class PreparedResultSet * __cdecl MySQLConnection::Query(class PreparedStatementBase *)" (?Query@MySQLConnection@@QEAAPEAVPreparedResultSet@@PEAVPreparedStatementBase@@@Z)
23>database.lib(MySQLConnection.obj) : error LNK2019: unresolved external symbol mysql_close referenced in function "public: virtual __cdecl MySQLConnection::~MySQLConnection(void)" (??1MySQLConnection@@UEAA@XZ)
23>database.lib(MySQLPreparedStatement.obj) : error LNK2019: unresolved external symbol mysql_stmt_param_count referenced in function "public: __cdecl MySQLPreparedStatement::MySQLPreparedStatement(struct MySQLStmt *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0MySQLPreparedStatement@@QEAA@PEAUMySQLStmt@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
23>database.lib(MySQLPreparedStatement.obj) : error LNK2019: unresolved external symbol mysql_stmt_attr_set referenced in function "public: __cdecl MySQLPreparedStatement::MySQLPreparedStatement(struct MySQLStmt *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (??0MySQLPreparedStatement@@QEAA@PEAUMySQLStmt@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
23>C:\Program Files (x86)\MySQL\MySQL Server 5.7\lib\libmysql.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
23>C:\Trinity\Build\bin\Release\worldserver.exe : fatal error LNK1120: 42 unresolved externals
23>Done building project "worldserver.vcxproj" -- FAILED.
24>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
24>Building Custom Rule C:/Trinity/Source/CMakeLists.txt
========== Build: 22 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========

Link to post
Share on other sites

Hey @SavageSight sorry for the late reply man.

Have you been through the WIKI to make sure you have the correct programs/versions installed?

https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977296/Windows+Requirements

It looks like all of your errors point to database errors so this could be a good place to start.

Also make sure you follow their build setup guide here:

https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977329/Windows+Core+Installation

Link to post
Share on other sites
On 4/28/2020 at 6:48 PM, Madness said:

Hey @SavageSight sorry for the late reply man.

Have you been through the WIKI to make sure you have the correct programs/versions installed?

https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977296/Windows+Requirements

It looks like all of your errors point to database errors so this could be a good place to start.

Also make sure you follow their build setup guide here:

https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977329/Windows+Core+Installation

I am very new to this so everything I do I am learning and I apologize for the noobish questions. You've quite inspired me to continue to try to get this worked out. I do have a repack I have been using to play and have the database saved in the same program that my personal compilation will be using.

 2 questions

1. Could my database issues have anything to do with my repack using my same database manager as my personal TrinityCore compilation? Especially if I am using the same username and password to enter the database???

2. Should I be deleting this repack and all applicable files so that when I compile and build my trinitycore there are no other files that it could be trying to build from? I feel as though I can make this happen as I've gotten this far but I am having a hard time not thinking perhaps I am over my head trying this.

EDIT++

3. I am going to try to restart the process and make sure to follow the guide step for step all my programs match the listed ones. I will leave an update as you are one of the only forum posters who has attempted to help me so thank you muchly its appreciated.

Link to post
Share on other sites

Hi @SavageSight,

A repack cannot be compiled, it is something that has already been compiled and you just run it (by opening it and configuring your database).

If you want to be able to completely customise your own server, you will need to follow the guide I posted and compile from scratch (from the source code in GitHub).

The only thing you can change in a repack is the database data, which might be okay for your needs? You'll be able to update monster/creature HP, users and things like this. You just won't be able to add any C++ scripts.

I hope this helped.

Madness

Link to post
Share on other sites

Hey @Madness yes I totally understand that and I apologize as I am not getting my questions across properly. I understand the difference between a repack and compiling my own source that's the main reason i am attempting to compile my own. I would like to be able to add custom races mounts etc into the game. I am going to just start from scratch and try following your guide and hopefully I can compile and build successfully. 

My question pertaining to the repack was basically if I have a working repack on my computer can I still compile my own TrinityCore and run it completely separate from the repack without issue. 

I was asking but not well if the fact that I have a repack setup and working on my computer is possibly the reason why I am having database issues compiling and building a personal TrinityCore?

Really sorry for my horribly worded questions. Appreciate all the guidance haha.

Link to post
Share on other sites
  • 2 weeks later...

HMM i didn't read all the messages but i think u will need to install all the programms on the same BIT PLATFORM (32bit or 64bit) 

If they're the same, then the problem is MYSQL.  I had that kind of problems too.. When u reinstall the things just restart ur computer.

I hope i helped u! 

Greetings

Link to post
Share on other sites
On 5/2/2020 at 8:10 PM, SavageSight said:

Hey @Madness yes I totally understand that and I apologize as I am not getting my questions across properly. I understand the difference between a repack and compiling my own source that's the main reason i am attempting to compile my own. I would like to be able to add custom races mounts etc into the game. I am going to just start from scratch and try following your guide and hopefully I can compile and build successfully. 

My question pertaining to the repack was basically if I have a working repack on my computer can I still compile my own TrinityCore and run it completely separate from the repack without issue. 

I was asking but not well if the fact that I have a repack setup and working on my computer is possibly the reason why I am having database issues compiling and building a personal TrinityCore?

Really sorry for my horribly worded questions. Appreciate all the guidance haha.

Ohhh no prob, I understand. Yes, you can definitely compile the TrinityCore source and run a repack. All you need to do is change port numbers and database names (in the configs).

Definitely go through the WIKI page here - https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977296/Windows+Requirements

Also check this post out this post (although it's a few years old it might help).

Good luck friend :)

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...