# Thread: How To Compile Smart.

1. SRL Junior Member
Join Date
May 2013
Posts
72
Mentioned
3 Post(s)
Quoted
47 Post(s)
Brandon, thank you for this guide! Worked like a charm.

I tried to do this myself, but after 3 hours of failed attempts decided to google and found this awesome guide. lol.

Just one small thing, I think that you need to keep current libsmartremote32.dll and libsmartjni32.dll files, instead of copying the new ones, because it gave me this:
Code:
Error loading C:\Simba\Plugins\libsmartremote32.dll:
Compiling failed.
Thanks again and yay no more Blocking!

2. Originally Posted by MariusK
Brandon, thank you for this guide! Worked like a charm.

I tried to do this myself, but after 3 hours of failed attempts decided to google and found this awesome guide. lol.

Just one small thing, I think that you need to keep current libsmartremote32.dll and libsmartjni32.dll files, instead of copying the new ones, because it gave me this:
Code:
Error loading C:\Simba\Plugins\libsmartremote32.dll:
Compiling failed.
Thanks again and yay no more Blocking!

Glad you like it. You must've missed something in the makefile for such an error. Either static linking or -m32 is missing.

3. I tried this, as soon as I compile with this it stops at

I tried using just a batch file to compile but i'm going to assume this is necessary to do it this way

Any ideas? @Brandon

4. Originally Posted by Lucidity
I tried this, as soon as I compile with this it stops at

I tried using just a batch file to compile but i'm going to assume this is necessary to do it this way

Any ideas? @Brandon

G++ not found. You either don't have a C++ compiler installed.. OR you don't have it in your PATH.

5. Originally Posted by Brandon
G++ not found. You either don't have a C++ compiler installed.. OR you don't have it in your PATH.
Ah, turns out it was the path! Sorry and thanks

6. I tried to compile SMART, I followed instruction step by step and used Brandon's Makefile. On both PCs I tested it (Jdk7 and Jdk8) I've got this odd error:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 warnings
Creating JAR Archive...
Compiling SmartRemote.cpp
make: execvp: g++: Bad file number
make: *** [build/windows32/SmartRemote.o] Error 127
Last edited by bg5; 02-10-2017 at 01:13 AM.

7. Should probably hit OP up with a notification. @Brandon; post above ^

8. @bg5; Looks like it isn't finding a file. Maybe try looking to check if the correct path is being used?

9. Originally Posted by bg5
I tried to compile SMART, I followed instruction step by step and used Brandon's Makefile. On both PCs I tested it (Jdk7 and Jdk8) I've got this odd error:
You are compiling for Windows? Windows doesn't have execvp so it looks like you are invoking it for some other system.. At the same time, it shows "build/windows" as your directory..

make windows
make windows64

make test-windows
make test-windows64

are the only options for invoking it on windows.

For OSX or Linux:

make linux
make linux64

make test-linux
make test-linux64

If you are invoking it correctly, then something else is wrong with your build system. I would re-install MingW and MSYS.

MSYS (1.0.11): https://sourceforge.net/projects/min...or=superb-dca2

Same instructions should work. Only difference is that this is a way newer compiler by a few years. MSYS should be roughly the same as well.
Last edited by Brandon; 02-10-2017 at 01:34 AM.

10. Originally Posted by Kasi
@bg5; Looks like it isn't finding a file. Maybe try looking to check if the correct path is being used?
All PATHs in environmental variables seems ok, I checked more then few times. Also i have this at test-windows:
$make test-windows make: execvp: g++: Bad file number make: *** [test-windows] Error 127 but there definitely is g++.exe in my C:\mingw64\bin folder. 11. Originally Posted by Brandon If you are invoking it correctly, then something else is wrong with your build system. I would re-install MingW and MSYS. MSYS (1.0.11): https://sourceforge.net/projects/min...or=superb-dca2 MingW (6.3.0): https://sourceforge.net/projects/min...v1.7z/download Same instructions should work. Only difference is that this is a way newer compiler by a few years. MSYS should be roughly the same as well. Yup, I'm invoking it for windows. Thanks, I will try with those linked version. @edit Meh, @Brandon same error. Also, not sure if it has any value, but I have the same error after simply typing g++ into msys$ g++
Last edited by bg5; 02-10-2017 at 02:02 AM.

12. @bg5; Are your enviroment variable/paths correct? What do they look like?

13. Originally Posted by Kasi
@bg5; Are your enviroment variable/paths correct? What do they look like?
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Python27;C:\mingw64\ bin
I'm pretty sure they are correct.

14. Originally Posted by bg5
I'm pretty sure they are correct.
What happens if you do g++ in a plain command window? same error?

15. Originally Posted by bg5
I'm pretty sure they are correct.
ow, it says the version of C:\mingw\bin\g++.exe is not compatible with my version of Windows system, because it's for 64-bit.

but well, the version from the link says: MinGW-w64 - for 32 and 64 bit Windows

16. Originally Posted by bg5
ow, it says the version of C:\mingw\bin\g++.exe is not compatible with my version of Windows system, because it's for 64-bit.

but well, the version from the link says: MinGW-w64 - for 32 and 64 bit Windows
I believe the for 32 and 64 bit Windows refers to the toolchains and not the actual compiler. Also, did you change paths? originally you said your mingw path was C:\mingw64\bin, now its C:\mingw\bin.

Last edited by Kasi; 02-10-2017 at 03:43 AM.

17. Easy steps:
1. Install scoop (http://scoop.sh/)
1.5. Add scoop extras ($>scoop bucket add extras) 2. Install requirements with scoop ($>scoop install msys make gcc oraclejdk7) - there might be a couple extras needed, but I don't think so
3. Winkey+R to open run window, type in msys, press enter
4. Navigate to SMART directory in msys (Ex: $>cd C:\Users\MyUser\githubstuffs\SMART) 5. Run make windows[64] - depends on what arch your system is. 18. Originally Posted by Kasi I believe the for 32 and 64 bit Windows refers to the toolchains and not the actual compiler. Also, did you change paths? originally you said your mingw path was C:\mingw64\bin, now its C:\mingw\bin. This is the version i use: https://sourceforge.net/projects/min...v1.7z/download Your version is the same I use. yes, i've changed pathes for a moment, to try something... Basically i did it, because even through my path is c:/mingw64/bin ,if I type 'g++' into msys it says:$ g++
Very odd...

and Yes, path in my environment variables is proper and included '64'
Last edited by bg5; 02-15-2017 at 06:10 AM.

19. @bg5; You can set the mingw path directly at msys/1.0/etc/fstab. Make sure to restart you msys window after. Mine looks like:

Code:
C:/mingw64 /mingw
The reason it isn't picking it up is because it sets this variable during installation i believe.

http://www.mingw.org/wiki/Getting_Started

20. Originally Posted by Kasi
@bg5; You can set the mingw path directly at msys/1.0/etc/fstab. Make sure to restart you msys window after. Mine looks like:

Code:
C:/mingw64 /mingw
The reason it isn't picking it up is because it sets this variable during installation i believe.

http://www.mingw.org/wiki/Getting_Started
Oddly, I have proper path in my fstab folder.

Wiki says:
The preferred installation method is using the automated installer tool, as described below. While a manual installation is possible, we do not recommend it, unless you have a very old version of MS-Windows which is unable to run the graphical tool. Instructions for manual installation are provided below, if you really want (or need) to resort to it.
I've just downloaded mingw and unzipped it without using any installation. It may be the case ?

21. Originally Posted by bg5
Oddly, I have proper path in my fstab folder.

Wiki says:

I've just downloaded mingw and unzipped it without using any installation. It may be the case ?
no, I do the manual installation too. not really too sure what the problem is. I can suggest a few things i guess. Do you have admin privileges? Do you have UAC or any of that stuff enabled? Mind posting your full environment Path?