Problem when compiling using CodeBlocks
Moderator: Forum Moderators
-
- Code Contributor
- Posts: 14
- Joined: March 28th, 2013, 5:44 pm
Problem when compiling using CodeBlocks
Follow these instructions to build.
The only difference is that I had downloaded the version of CodeBlocks with MinGW, but follow the remaining instructions equally.
I'm using Windows 7, 32 bit. Already compiled other projects in CodeBlocks smoothly.
Results in compilation:
Liblua: I compile without error
Wesnoth:
The only difference is that I had downloaded the version of CodeBlocks with MinGW, but follow the remaining instructions equally.
I'm using Windows 7, 32 bit. Already compiled other projects in CodeBlocks smoothly.
Results in compilation:
Liblua: I compile without error
Wesnoth:
Wesnothd:swig -c++ -lua -I..\..\src -I..\..\src\sdl_ttf -I..\..\src\serialization -I..\..\src\widgets -IC:\Users\macabeus\Desktop\CodeBlocksWinSDK_13_04_2013\cb\include_tdm_gcc -o \\"C\Users\macabeus\Apenas Meu\Project Wesnoth\src/animated.cpp "C:\Users\macabeus\Apenas Meu\Project Wesnoth\src\animated.i"
Execution of 'swig -c++ -lua -I..\..\src -I..\..\src\sdl_ttf -I..\..\src\serialization -I..\..\src\widgets -IC:\Users\macabeus\Desktop\CodeBlocksWinSDK_13_04_2013\cb\include_tdm_gcc -o \\"C\Users\macabeus\Apenas Meu\Project Wesnoth\src/animated.cpp "C:\Users\macabeus\Apenas Meu\Project Wesnoth\src\animated.i"' in 'C:\Users\macabeus\Apenas Meu\Project Wesnoth\projectfiles\CodeBlocks' failed.
||=== Build: Debug in liblua (compiler: GNU GCC Compiler) ===|
||=== Build: Debug in wesnothd (compiler: GNU GCC Compiler) ===|
C:\Users\macabeus\Apenas Meu\Project Wesnoth\src\server\server.cpp|493|warning: #warning "No FIFODIR set"|
libgomp.spec||No such file or directory|
||=== Build failed: 1 error(s), 1 warning(s) (9 minute(s), 40 second(s)) ===|
Last edited by macabeus_br on May 1st, 2014, 12:41 am, edited 1 time in total.
Re: Problem when compiling using CodeBlocks
Try removing
src/animated.i
from the “wesnoth” project in the CodeBlocks file list (but do not delete the actual on-disk file!). It’s not supposed to be compiled directly, and CB appears to believe it’s supposed to be handled with something other than a C++ compiler for some reason.Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Problem when compiling using CodeBlocks
Are you using Codeblocks 12 or 13? Codeblocks 13 is the latest download, but I can compile fine using Codeblocks 12.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Code Contributor
- Posts: 14
- Joined: March 28th, 2013, 5:44 pm
Re: Problem when compiling using CodeBlocks
shadowm, I did what I suggested. Helped, compiled much of the code, but still returns error.
Pentarctagon, not understand why the version of codeblocks would mess.g++.exe: libgomp.spec: No such file or directory
Process terminated with status 1 (123 minute(s), 33 second(s))
1 error(s), 0 warning(s) (123 minute(s), 33 second(s))
Re: Problem when compiling using CodeBlocks
That’s probably because you don’t have the OpenMP support files installed, and for some weird reason our CB project defaults to enabling OpenMP, which is both unnecessary and poorly supported.KeplerBR wrote:shadowm, I did what I suggested. Helped, compiled much of the code, but still returns error.g++.exe: libgomp.spec: No such file or directory
In CB 12.11 this can be disabled by right-clicking each project, choosing Build options, choosing the topmost entry in the tree view on the left of the Project build options dialog, choosing Compiler settings → Other options, and removing
-fopenmp
from the textbox. I hope the procedure is not too different on newer versions.Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
-
- Code Contributor
- Posts: 14
- Joined: March 28th, 2013, 5:44 pm
Re: Problem when compiling using CodeBlocks
Not solve the problem, because then returns messages like undefined reference to `GOMP_critical_*'.
It says the reason is precisely the lack of flag you said to delete.
A few months ago I managed to compile the game without many problems, do not know why I'm now facing all this.
It says the reason is precisely the lack of flag you said to delete.
A few months ago I managed to compile the game without many problems, do not know why I'm now facing all this.
Re: Problem when compiling using CodeBlocks
We build wesnoth on pretty much every platform with openmp disabled. This removes the
If for some reason
-fopenmp
flag. Have you tried fully rebuilding after that change?If for some reason
_OPENMP
is still defined without that flag, that sounds like a bug in your compiler setup.-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Problem when compiling using CodeBlocks
I had enabled OpenMP in the past (opposite procedure as what's described by shadowm above), likely because at that point the windows releases were build with it. If that's no longer the case, it should be removed.
IIRC it did not require changing something in the build system, and removing the flag should do even less so. Thus I suggest deleting the output folder (projectfiles/CodeBlocks/(.)objs-release and/or -debug) in a file manager, to make sure everything is rebuilt.
It was neccessary to install the compiler with OpenMP support enabled though to compile with OpenMP, there is a flag for it during the installation procedure. This will no longer be the case.
IIRC it did not require changing something in the build system, and removing the flag should do even less so. Thus I suggest deleting the output folder (projectfiles/CodeBlocks/(.)objs-release and/or -debug) in a file manager, to make sure everything is rebuilt.
It was neccessary to install the compiler with OpenMP support enabled though to compile with OpenMP, there is a flag for it during the installation procedure. This will no longer be the case.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Problem when compiling using CodeBlocks
You may have to clean the current build and start again using the Rebuild option in the menus (instead of Build), or following anonymissimus’ instructions above.KeplerBR wrote:Not solve the problem, because then returns messages like undefined reference to `GOMP_critical_*'.
It says the reason is precisely the lack of flag you said to delete.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Problem when compiling using CodeBlocks
I don't know, but I am able to compile with Codeblocks 12.11 and only get the animated.i error after upgrading to 13.12.KeplerBR wrote:Pentarctagon, not understand why the version of codeblocks would mess.
That said, removing that file from the project seems to have fixed the error for me.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Code Contributor
- Posts: 14
- Joined: March 28th, 2013, 5:44 pm
Re: Problem when compiling using CodeBlocks
Finally compiled successfully. Thank you for your cooperation
It might be good to add this information that you told me on the topic in the document I quoted in the first post.
OFF: It took about 170 minutes to compile
It might be good to add this information that you told me on the topic in the document I quoted in the first post.
In addition to the clearshadowm wrote:In CB 12.11 this can be disabled by right-clicking each project, choosing Build options, choosing the topmost entry in the tree view on the left of the Project build options dialog, choosing Compiler settings → Other options, and removing-fopenmp
from the textbox. I hope the procedure is not too different on newer versions.
-fopenmp
informed the tab you also, deleted in the tab Linker SettingsOFF: It took about 170 minutes to compile
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Problem when compiling using CodeBlocks
If you PC has multiple cores, you can use them by changing the value in Settings > Compiler > Build options > Number of processes for parallel buildsKeplerBR wrote:OFF: It took about 170 minutes to compile
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Problem when compiling using CodeBlocks
I think the animated.i error has to do with this maybe?
http://wiki.codeblocks.org/index.php?ti ... ild_system
I have renamed the file from animated.i to animated.tpp in master. That's usually what you name header files that contain only templates, and it is only referred to by animated_game.cpp so this wasn't a big change.
https://github.com/wesnoth/wesnoth/comm ... e7e92f510c
http://wiki.codeblocks.org/index.php?ti ... ild_system
I have renamed the file from animated.i to animated.tpp in master. That's usually what you name header files that contain only templates, and it is only referred to by animated_game.cpp so this wasn't a big change.
https://github.com/wesnoth/wesnoth/comm ... e7e92f510c
- Pentarctagon
- Project Manager
- Posts: 5564
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Problem when compiling using CodeBlocks
Yes, that seems to have fixed the codeblocks issue
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code