Jump to content
  • 0

Mangoszero - ACE - Compiling problem.


gankspank

Question

OS: Windows 8 Pro 64 bit

Visual Studio c++ 2010

CMAKE 2.8.12.1

ACE 6.0.8

MangosZero 0.18.1

I followed these steps http://paste2.org/xyKcN7xC CMAKE finds ace LIBS ( Release - Debug ) But not include folder, which i have to add via ADVANCED TAB. Include folder is in C:\Program Files\ACE\6.0.8\ACE ( Has also the folders BIN and LIB. ). As well as in C:\Program Files (x86)\ACE\6.0.8\ACE.

Yet i get this error when i'm compiling in visual 2010, http://paste2.org/xpILZOMJ ,this is the only source when compiling this has happened, and i guess is because there are no precompiled ace dependencies in the source folder anymore.

I have tried adding the include directories inside visual 2010 but still get the error.

CMAKE configuring fresh. http://i.imgur.com/e5lTVTy.jpg

Added path to include via ADVANCED. http://i.imgur.com/dLdRTv9.jpg

More of advanced tab. http://i.imgur.com/7yMNgkU.jpg

Result when compiling in Visual c++ 2010. http://paste2.org/xpILZOMJ

Any help on how to add these locations to visual c++ directories, ( from you're experience ) would be helpful, because this is the only problem i am encountering. I have added the include directories etc to the system environment variables.

Any help would be great!

Thanks Gankspank.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

Oh man did I have a terrible time figuring this out within the last hour.

You've got to create a file in your "ace" folder under ACE_wrappers (the folder in which the source you need to compile is in)

Call it config.h

Put this line inside of the file and save it:

#include "ace/config-win32.h"

After that you should be able to compile the source, if this doesn't work then I have no idea (I'm very new at this) - just my attempt at sharing what I've learned!

Good luck.

Link to comment
Share on other sites

Edit: I got this to work by manually pointing Cmake at the proper directory, as such

ACE_INCLUDE_DIR /*path-to-ace*/ace (this folder should include ace.h)

ACE_LIBRARY_DEBUG (and/or release) /*path-to-ace*/lib/ace.lib

Edit2: Never mind, this only fixes the inability to generate a sln. When you try to build it it still throws piles of errors about being unable to find basic_types.h

Link to comment
Share on other sites

Edit: I got this to work by manually pointing Cmake at the proper directory, as such

ACE_INCLUDE_DIR /*path-to-ace*/ace (this folder should include ace.h)

ACE_LIBRARY_DEBUG (and/or release) /*path-to-ace*/lib/ace.lib

Edit2: Never mind, this only fixes the inability to generate a sln. When you try to build it it still throws piles of errors about being unable to find basic_types.h

My problem exactly :(

Link to comment
Share on other sites

Looks like this is only a Windows Issue. I've tested this before and had no issues with it. Try compiling on Linux and see if you get the same thing?

I'm building specificly for Windows so whether it works in Linux or not is a moot point for me. I'll just roll back to pre-0.18

Edit: The problem doesnt seem to be WITH ace, but that the environment isn't recognizing the ace directory starting at line 40 in /server/src/framework/platform/define.h

#include <ace/Basic_Types.h>

So from my basic knowledge of Cmake id say an environment is being declared wrong somewhere

Link to comment
Share on other sites

I'm building specificly for Windows so whether it works in Linux or not is a moot point for me. I'll just roll back to pre-0.18

I just downloaded the source and did as the step said to do, and compiles fine for me. Most likely you're not linking something correctly.

How I do it, I just add the ACE_wrappers and the new ACE dependencies and works just fine. What I see, that you're installing ACE on to C drive, where the source can't read it from.

By default, the source is still trying to read ACE from the dependencies folder. Hope this helps.

Link to comment
Share on other sites

I just downloaded the source and did as the step said to do, and compiles fine for me. Most likely you're not linking something correctly.

How I do it, I just add the ACE_wrappers and the new ACE dependencies and works just fine. What I see, that you're installing ACE on to C drive, where the source can't read it from.

By default, the source is still trying to read ACE from the dependencies folder. Hope this helps.

Could you go into more detail? One of the first things i tried while troubleshooting initially was moving ace back into the dep dir, but it did no good. could you give your exact directory layout in that area? maybe im failing to put one of the new ace_wrappers dependencies in the right place

Link to comment
Share on other sites

Okay guys, let me sum this thing up:

the problem here is that you did not properly follow the compilation instructions for ACE from the ACE website. As mentioned here (http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#msvc )

You have to create a file called config.h in the ACE_ROOT\ace directory that contains:

#include "ace/config-win32.h"

Then you build the ACE project (not the whole solution) in both Debug and Release mode.

Then you do create the following directory structure:

C:\Program Files\ACE\6.0.8\
C:\Program Files\ACE\6.0.8\lib\
C:\Program Files\ACE\6.0.8\include\
C:\Program Files\ACE\6.0.8\include\ace\

C:\Program Files\ACE\6.0.8\lib\ contains all .dll, .lib, and .exp files created during the ACE build.

C:\Program Files\ACE\6.0.8\include\ace\ equals the ace directory from the ACE source archive.

Then it is properly installed and working.

The issue here is not the build system being broken, the issue here is both a technical issue as Windows does not have any decent mechanism for installing and maintaining libraries, e.g. NuGet facilitates this partially but still not in decent quality.

Also to be honest, you are just being used to the dirty, hacked old build system, which did things not in a clean way.

And to finish this up: no, you do not download ACE and put it back in the deps/ directory. That would just be so wrong. You build it, create the directory structure as mentioned and above, and copy a few files. This is the official Windows way, and you can even get certified for installing your stuff this way.

What we want to achieve here, is that you download, build, and install ACE in a way, which Microsoft has defined as acceptable and clean for Windows (since you insist on doing it the Windows way).

I built the new build system very closely following the official Windows SDK docs on how apps should be installed and handle dependencies. If people have issues sorting out the dependencies, I can make a YouTube video showing how it should be done.

Update

Seeing that people do have trouble getting ACE installed properly, here is a screenshot of how it should look like in your explorer, taken from a Windows 7 virtual machine:

gesy.png

Link to comment
Share on other sites

Yep, that worked beautifully, but now I'm getting an error relating to mysql :P

6>mangos-sharedd.lib(QueryResultMysql.obj) : error LNK2001: unresolved external symbol _mysql_free_result@4
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_real_escape_string@16 referenced in function "public: virtual unsigned long __thiscall MySQLConnection::escape_string(char *,char const *,unsigned long)" (?escape_string@MySQLConnection@@UAEKPADPBDK@Z)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_thread_safe@0 referenced in function "public: __thiscall DatabaseMysql::DatabaseMysql(void)" (??0DatabaseMysql@@QAE@XZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_init@4 referenced in function "public: virtual bool __thiscall MySqlPreparedStatement::prepare(void)" (?prepare@MySqlPreparedStatement@@UAE_NXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_prepare@12 referenced in function "public: virtual bool __thiscall MySqlPreparedStatement::prepare(void)" (?prepare@MySqlPreparedStatement@@UAE_NXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_execute@4 referenced in function "public: virtual bool __thiscall MySqlPreparedStatement::execute(void)" (?execute@MySqlPreparedStatement@@UAE_NXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_param_count@4 referenced in function "public: virtual bool __thiscall MySqlPreparedStatement::prepare(void)" (?prepare@MySqlPreparedStatement@@UAE_NXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_bind_param@8 referenced in function "public: virtual void __thiscall MySqlPreparedStatement::bind(class SqlStmtParameters const &)" (?bind@MySqlPreparedStatement@@UAEXABVSqlStmtParameters@@@Z)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_close@4 referenced in function "private: void __thiscall MySqlPreparedStatement::RemoveBinds(void)" (?RemoveBinds@MySqlPreparedStatement@@AAEXXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_result_metadata@4 referenced in function "public: virtual bool __thiscall MySqlPreparedStatement::prepare(void)" (?prepare@MySqlPreparedStatement@@UAE_NXZ)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_stmt_error@4 referenced in function "public: virtual void __thiscall MySqlPreparedStatement::bind(class SqlStmtParameters const &)" (?bind@MySqlPreparedStatement@@UAEXABVSqlStmtParameters@@@Z)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_autocommit@8 referenced in function "public: virtual bool __thiscall MySQLConnection::Initialize(char const *)" (?Initialize@MySQLConnection@@UAE_NPBD@Z)
6>mangos-sharedd.lib(DatabaseMysql.obj) : error LNK2019: unresolved external symbol _mysql_close@4 referenced in function "public: virtual __thiscall MySQLConnection::~MySQLConnection(void)" (??1MySQLConnection@@UAE@XZ)
6>mangos-sharedd.lib(QueryResultMysql.obj) : error LNK2019: unresolved external symbol _mysql_fetch_row@4 referenced in function "public: virtual bool __thiscall QueryResultMysql::NextRow(void)" (?NextRow@QueryResultMysql@@UAE_NXZ)

(goes on like that for awhile, not gonna post it all) the errors all originate from the same place. Searching around the forums it sounds like this is usually encountered when compling the wrong version of scriptdev2, but scriptdev2 is now part of the main package so I can't imagine I have the wrong version.

Link to comment
Share on other sites

The error messages you see, are the result of installing MySQL server without the development files, or you used MySQL > 5.5.

When installing MySQL, make sure to use a custom installation and select the development files, too. If they are not installed, you will have no build files on your computer, and thus see this error.

Link to comment
Share on other sites

The error messages you see, are the result of installing MySQL server without the development files, or you used MySQL > 5.5.

When installing MySQL, make sure to use a custom installation and select the development files, too. If they are not installed, you will have no build files on your computer, and thus see this error.

Yes i got that error aswell after i recompiled ace like you said and it worked. So i reinstalled mysql 5.5.34 to path ProgramFiles instead of ProgramFiles (x86) with the development files.

Note, i had already a full custom installation with the development files when i got the same errors as Ness199X.

Also i would like to thank you for clarifying to only build Project ACE, and not the whole solution! And i would like to thank everyone else aswell!

Link to comment
Share on other sites

Let's take a step back here, and clarify another thing:

Currently due to technical issues you can only create Win32 builds of mangos-zero, a Win64 solution is in the making. (The reason being, there are no Win64 installers of zlib, bzip2, and we are investigating the use of NuGet package manager)

This means, you will have to install the Win32 version of MySQL too. You can not mix a 32bit build of zlib, bzip2, etc with a 64bit build of ACE and MySQL.

CMake automatically selects program files when building Win64, and program files (x86) when building Win32, so do not try to trick or fake anything with forcing a 32 bit install to just program files.

i hope this helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use