Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / compile AGK in 64 bits

Author
Message
Thestroyer
7
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 11th Feb 2017 20:15 Edited at: 11th Feb 2017 20:16
I use the armadillo library and in the documentation it says that you have to compile in 64 bit. I'm using visual studio 2015. I tried compiling in both 32 bits (win32) and 64 bits (x64).

When I compile in 64 bits I get the error
"Error LNK1112 module machine type 'X86' conflicts with target machine type 'x64' (...)\AGKWindows.lib(WindowsCore.obj)".

When I compile in 32 bits I get a whole bunch of 'unresolved externals-errors' that probably come from the armadillo dependencies "BLAS" and "LAPAC" of which I have the 64 bits versions.
I use windows 10 64 bits.

Is there any way I can compile agk in 64 bits or do you know another solution to this?
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 11th Feb 2017 22:18
I do not believe that you can compile AppGameKit in 64 bits.
AGK also uses the Bullet Physics library which is 32 bit only so this would be one problem.

Why do you need the Armadillo library?
Are you sure that you can not compile the Armadillo library as x86?
The coffee is lovely dark and deep,and I have code to write before I sleep.
Thestroyer
7
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 12th Feb 2017 18:54 Edited at: 12th Feb 2017 18:58
I use AppGameKit and armadillo for some learning project of mine to learn things about AI. I use AppGameKit for visualization and physics and I use armadillo for matrix math.

I can compile some functions of armadillo in x86, but if I wanna use matrix multiplication (and I think other functions too) it gives the unresolved externals-errors. I think armadillo uses BLAS for matrix multiplication. Could the problem be that I have BLAS in 64 bits and I need to download the 32 bits version? I don't see why a 32 bits library wouldn't work in 64 bits. You can run 32 bits programs on 32 bit window, can you?
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 12th Feb 2017 19:34
Quote: "I use armadillo for matrix math"


Obviously your are working in Tier2 so why would not use the Matrix math that is
already available to you in AGK. Also the Bullet physics library also has all the matrix
math as well which is also available to you in Tier 2.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Thestroyer
7
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 13th Feb 2017 20:33 Edited at: 13th Feb 2017 20:35
Yes, i'm working in tier 2.
I don't really get how I make a matrix in agk. I see there are vectors in the agk library but I can't find a matrix class.
Could you give an example of making a 5x3 matrix and a 3x6 matrix and matrix multiplying them.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 14th Feb 2017 01:35
Just look in 3DMath.h

The coffee is lovely dark and deep,and I have code to write before I sleep.
Thestroyer
7
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 14th Feb 2017 19:58 Edited at: 14th Feb 2017 20:08
It seems like AGKMatrix3 is of constant size 3x3, so that doesn't fit my purposes, but I found another agk class that does fit my purposes: btMatrixX, so thank you for sending me in the right direction.

EDIT: I just found a way to not use BLAS and lapack and still use matrix multiplication with armadillo. I like the armadillo library so I'll still use it.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 14th Feb 2017 22:16
Quote: "It seems like AGKMatrix3 is of constant size 3x3, so that doesn't fit my purposes, but I found another agk class that does fit my purposes: btMatrixX, so thank you for sending me in the right direction."


I read your post a little too fast so yes AGKMatrix3 is of constant size 3x3. The btMatrix is also 3x3 which is part of the Bullet Physics library.

Just out of curiosity what are you using these matrices for? I have not had a use for a 5x3 or a 3x6 matrix.

Quote: "I just found a way to not use BLAS and lapack and still use matrix multiplication with armadillo. I like the armadillo library so I'll still use it."


So you are saying that if you leave out those you can compile it 32 bit?
Is armadillo cross platform?
The coffee is lovely dark and deep,and I have code to write before I sleep.
Thestroyer
7
Years of Service
User Offline
Joined: 14th May 2016
Location:
Posted: 15th Feb 2017 07:48 Edited at: 15th Feb 2017 07:51
As I said it's for a hobby project of mine, so I don't need cross platform compatibility. The reason I'm still using agk is because I already know and have it.
The matrices were just an example, but matrices of that size could be needed. I wanna make a neural network ( I'm assuming you know what those are) and I store the weights in matrices. If your input size is 5 and your first layer size is 3, you need a 5x3 matrix. The matrix of the weights of layer 2 = (FirstLayerSize x SecondLayerSize).

Quote: "//#define ARMA_USE_BLAS
//// Comment out the above line if you don't have BLAS or a high-speed replacement for BLAS,
//// such as OpenBLAS, GotoBLAS, Intel MKL, AMD ACML, or the Accelerate framework.
//// BLAS is used for matrix multiplication.
//// Without BLAS, matrix multiplication will still work, but might be slower."

This is what the config file of armadillo says. I commented the line and it used the built-in version of armadillo matrix multiplication which isn't pre-built, so it can compile in any way I want. I think I can also download a 32-bit version of BLAS, but I don't need the speed as I'm using fairly small matrices. LAPACK is used for matrix decompositions, but I'm not using that so I just undefined ARMA_USE_LAPACK.

Login to post a reply

Server time is: 2024-04-20 06:39:58
Your offset time is: 2024-04-20 06:39:58