Need some help to compile Stratagus
Hello everyone,
I tried myself to compile Stratagus, but I had no luck.
I think I do anything as the page (http://
However, I got a lot of compile errors.
If I anyone can help me, I am very appreciative.
Ulit
(<email address hidden>)
Question information
- Language:
- English Edit question
- Status:
- Open
- For:
- Stratagus Edit question
- Assignee:
- Bradley Clemetson Edit question
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
What operating system are you using?
what are the compile errors?
Revision history for this message
![]() |
#2 |
I use Windows 7.
The compile errors are:
make: CXX@: Command not found
make: *** [src/action/
Revision history for this message
![]() |
#3 |
By the way, I use NetBean IDE to compile.
What IDE should l use to compile the code?
Thank you.
Revision history for this message
![]() |
#4 |
The first problem I think is that the stratagus.com site is very old and out of date (Check the ones under the "doc/install.
1.Ensure all the libraries are installed correctly (Deps)
2.Open minGW and navigate to the root project folder
3. Create a "build" directory "mkdir build"
4.Run cmake to generate the correct makefiles "cmake .."
5.Compile the result "cmake .."
That should create a stratagus.exe file
Sorry I can't help you specifically yet as I use Ubuntu & OSX mostly, but I will work it out with you :)
We also have pre-built binaries if you would like to simply run it directly on the right hand side of the downloads bar
(https:/
Revision history for this message
![]() |
#5 |
http://
(we have 4 copies on this page, and the web one hasn't been updated... sorry).
I don't use CMake with NetBean, but it seems to be possible according to a quick search on google.
Revision history for this message
![]() |
#6 |
Thank you so much guy.
How I can ensure that I installed all the libraries below correctly?
1. CMake ----> I think this one I have installed it correctly.
2. SDL
3. libpng
4. zlib
5. Lua 5.1 ----> I think this one I have installed it correctly.
6. Tolua++
Thank you in advance for your answers.
Revision history for this message
![]() |
#7 |
Thank you for the replies.
I still cannot figure out how to compile it.
It is very complicate for me.
Could possibly someone give me the zip file of Visual C++ project of the Stratagus?
So I believe I can finally compile it.
my email: <email address hidden>
Thank you guys.
Revision history for this message
![]() |
#8 |
In the install page, there is a zip with all lib for msvc.
once unzipped, you run:
cmake.exe -DENABLE_STATIC=ON -G"Visual Studio 10" -DCMAKE_
then you can compile with msvc.
If you have some error, report here.
Revision history for this message
![]() |
#9 |
Thank you so much.
This is the error after I ran the command:
cmake.exe -DENABLE_STATIC=ON -G"Visual Studio 10" -DCMAKE_
CMake Error: CMake was unable to find a build program corresponding to "Visual Studio 10".
CMAKE_MAKE_PROGRAM is not set.
You probably need to select a different build tool.
CMake Error: Could not find cmake module file:C:
CMake Error: Could not find cmake module file:C:
-- Configuring incomplete, errors occurred!
I have Visual Studio 2012 and Visual C++ 2005.
Do I need to have Visual Studio 10?
Thank you very much again.
Revision history for this message
![]() |
#10 |
in http://
I don't see VS2012, you may test VS2011 generator maybe.
else, choose any supported IDE.
Revision history for this message
![]() |
#11 |
run:
cmake --help
it will show all available generators
Revision history for this message
![]() |
#12 |
Hi guys,
Thank you for all responds.
I already installed Visual Studio 2010.
And, here is the result and errors after I used cmake.exe
C:\NetBeansProj
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/NetBeansProj
Run Build Command:
Microsoft (R) Visual Studio Version 10.0.30319.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: cmTryCompileExe
Debug Win32 ------
1>Build started 11/10/2012 2:40:30 AM.
1>PrepareForB
1> Creating directory "C:\NetBeansPro
1>InitializeB
1> Creating "cmTryCompileEx
1>ClCompile:
1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompil
/Fd"C:
mpileExec109663
/Gd /TC /analyze- /errorReport:prompt testCCompiler.c /Zm1000
1>
1> testCCompiler.c
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.85
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:29 (project)
-- Configuring incomplete, errors occurred!
Any help, I am very appreciative.
Revision history for this message
![]() |
#13 |
I also have Visual Studio 11 installed in my computer.
And, here is the result after running cmake........
C:\NetBeansProj
-- The C compiler identification is MSVC 17.0.50727.1
-- The CXX compiler identification is MSVC 17.0.50727.1
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files (x86)/CMake 2.8/share/
Could NOT find PkgConfig (missing: PKG_CONFIG_
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/
C:/Program Files (x86)/CMake 2.8/share/
CMakeLists.
-- Configuring incomplete, errors occurred!
I think using Visual Studio 11 is more progress in compiling the cmake command.
Could anyone tell me what I should do next? There are still some errors in the result.
Thank you.
Revision history for this message
![]() |
#14 |
Correct me if I'm wrong but looks like you need to install a program known as pkg-config, you can get it @
http://
Revision history for this message
![]() |
#15 |
pkgconfig is needed only for maemo. but I forgot to add pkgconfig check into maemo section.
Apply this patch and tell me if it working:
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-08-31 16:55:27 +0000
+++ CMakeLists.txt 2012-11-11 11:47:57 +0000
@@ -556,10 +556,9 @@ if(UNIX AND CMAKE_SYSTEM_NAME MATCHES BS
set(BSD true)
endif()
-find_package(
-
# Check if platform is Maemo
if(UNIX AND CMAKE_SYSTEM_NAME MATCHES Linux)
+ find_package(
pkg_check_
if(MAEMO_
set(MAEMO true)
Revision history for this message
![]() |
#16 |
Thank you so much for your help from all of you guys.
I already downloaded the "pkg-config" from the link you give me and extracted it.
However, there are no *.exe files for me to install the program.
Pali, thank you very much.
However, I don't understand what do you want me to do?
"=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-08-31 16:55:27 +0000
+++ CMakeLists.txt 2012-11-11 11:47:57 +0000
.... and so on ......."
Could you please kindly explain to me what do you want me to do?
Do you mean I should delete the file CMakeLists.txt and download the new one with its date 2012-11-11?
If you mean this, could you please give me the link of the new CMakeLists.txt file?
Anyhow, if anyone can compile Stratagus under Windows OS,
could possibly you give me the whole project file?
This is because I believe I will can compile it without any configuration or less configuration.
Thank you so much.
my email address: <email address hidden> or <email address hidden>
Revision history for this message
![]() |
#17 |
Above patch is in unified diff format, which is acceptable by patch program. See wiki about format https:/
If you do not have patch program installed you can modify file by yourself, format is human readable. Lines which start with '-' are not in new version and line with '+' are in new version.
Revision history for this message
![]() |
#18 |
Note also that in the command line -DCMAKE_
c:/path/to/3rd has to be replaced by the path where you unzip msvc-lib.zip .
Revision history for this message
![]() |
#19 |
Hi Guys,
I still need your help. I don't have experience much about using cmake.
Here are the errors I got. What should I try next?
Thank you so much for any help your provide.
Is it possible for someone to remote help me with a program like showmypc.com?
I really cannot compile it. It is so complicate for me.
I almost give up now, but I can't because I need to modify it for my ai research.
If someone want to send me a private message, this is my email <email address hidden>
C:\NetBeansProj
-- The C compiler identification is MSVC 17.0.50727.1
-- The CXX compiler identification is MSVC 17.0.50727.1
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files (x86)/CMake 2.8/share/
Could NOT find PkgConfig (missing: PKG_CONFIG_
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/
C:/Program Files (x86)/CMake 2.8/share/
CMakeLists.
-- Configuring incomplete, errors occurred!
Revision history for this message
![]() |
#20 |
As mentionned by Pali, modify CMakeLists.txt
by removing (around line 556)
-- 8< --
find_package(
-- >8 --
and relaunch cmake
Revision history for this message
![]() |
#21 |
I commited that patch to trunk: https:/
Can you help with this problem?
Provide an answer of your own, or ask ULIT JAIDEE for more information if necessary.