can't build zdoom properly

Need help running G/Q/ZDoom/ECWolf/Zandronum/3DGE? Did your computer break? Ask here.

Moderator: GZDoom Developers

Guest

can't build zdoom properly

Post by Guest »

I am trying to generate my project in visual studio but it is quite difficult for me since I have no experience with cmake.


https://i.imgur.com/G8SMCWF.png
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47976
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: can't build zdoom properly

Post by Graf Zahl »

You shouldn't need to do anything. Just enter the path to the project, a path to where you want to generate the VS solution, then click configure, do this again and then click generate.
After that you should have a working VS solution in the directory you specified.

However, to actually run the generated EXE you need the DLLs from the latest release so you'll have to download that.
_mental_
 
 
Posts: 3771
Joined: Sun Aug 07, 2011 4:32 am

Re: can't build zdoom properly

Post by _mental_ »

Source code directory should be gzdoom-master, not src.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

Graf Zahl wrote:You shouldn't need to do anything. Just enter the path to the project, a path to where you want to generate the VS solution, then click configure, do this again and then click generate.
After that you should have a working VS solution in the directory you specified.

However, to actually run the generated EXE you need the DLLs from the latest release so you'll have to download that.

Code: Select all

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
CMake Error at CMakeLists.txt:3 (include):
  include could not find requested file:

    precompiled_headers


Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
CMake Warning at CMakeLists.txt:18 (find_package):
  By not providing "FindZMusic.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ZMusic", but
  CMake did not find one.

  Could not find a package configuration file provided by "ZMusic" with any
  of the following names:

    ZMusicConfig.cmake
    zmusic-config.cmake

  Add the installation prefix of "ZMusic" to CMAKE_PREFIX_PATH or set
  "ZMusic_DIR" to a directory containing one of the above files.  If "ZMusic"
  provides a separate development package or SDK, be sure it has been
  installed.


Building for target architecture: 
CMake Error at CMakeLists.txt:57 (if):
  if given arguments:

    "X64" "OR" "MATCHES" "i386"

  Unknown arguments specified


Configuring incomplete, errors occurred!
it doest work....
_mental_
 
 
Posts: 3771
Joined: Sun Aug 07, 2011 4:32 am

Re: can't build zdoom properly

Post by _mental_ »

I already explained what the problem is in my previous post.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

_mental_ wrote:I already explained what the problem is in my previous post.
i already did it

https://i.imgur.com/skY2Vkb.png
User avatar
Rachael
Admin
Posts: 12885
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: can't build zdoom properly

Post by Rachael »

Your setup should be something resembling this:



Having the build folder inside the gzdoom checkout should be optional, but I've noticed that sometimes it just works better doing it that way. Nevertheless, this works perfectly and has never caused me problems. The Windows version of the GZDoom source code can be configured out-of-the-box with literally nothing more than Git, CMake, the Windows SDK, and some recent version of Visual Studio.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

Rachael wrote:Your setup should be something resembling this:



Having the build folder inside the gzdoom checkout should be optional, but I've noticed that sometimes it just works better doing it that way. Nevertheless, this works perfectly and has never caused me problems. The Windows version of the GZDoom source code can be configured out-of-the-box with literally nothing more than Git, CMake, the Windows SDK, and some recent version of Visual Studio.
do you have to add each entry manually? i mean CMAKE_FORMAT_CMD , BUILD_SHARED_LIBS , DYN_OPNAL etc
User avatar
Rachael
Admin
Posts: 12885
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: can't build zdoom properly

Post by Rachael »

No, those are auto generated.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

guys ! . i've got it, i change destination path to cmake /gzdoom-master/cmake but now i've got a new problem while compiling in visual studio..

my cmake right now


https://i.imgur.com/c5S30Rl.png


visual studio

it says Unable to start program, access is denied
https://imgur.com/4Jb5p4i
Last edited by geek-programmer on Sat Apr 02, 2022 9:33 am, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47976
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: can't build zdoom properly

Post by Graf Zahl »

You have to set the paths for the EXE and the working directory manually in the debugger settings. CMake doesn't do it automatically. We once had a script to fill these in, but it caused more damage than good so it was removed once we found out.
User avatar
Rachael
Admin
Posts: 12885
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: can't build zdoom properly

Post by Rachael »

Why are you insisting on using the subfolders? Both me and mental told you not to do that. I even showed you a screenshot of a perfectly working CMake generation - where the source was pointed right at the root of the checkout - where it should be.

The only subfolder you should ever use is one designated specifically for building (i.e. "build") - and it should not be an existing folder in the checkout - the source folder should always point to the root of the source checkout or unpack. You will have to make this folder on your own - it does not come with the git checkouts. You can build directly into the root source folder if you want to but - that is not recommended and it is very messy. But it is supposed to work.

Don't expect to be able to modify GZDoom at all if you can't follow this simple instruction.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

Rachael wrote:Why are you insisting on using the subfolders? Both me and mental told you not to do that. I even showed you a screenshot of a perfectly working CMake generation - where the source was pointed right at the root of the checkout - where it should be.

The only subfolder you should ever use is one designated specifically for building (i.e. "build") - and it should not be an existing folder in the checkout - the source folder should always point to the root of the source checkout or unpack. You will have to make this folder on your own - it does not come with the git checkouts. You can build directly into the root source folder if you want to but - that is not recommended and it is very messy. But it is supposed to work.

Don't expect to be able to modify GZDoom at all if you can't follow this simple instruction.
then should i create a "build" folder ? , the problem is that i did it before and it doesn't work , i think because makefiles weren't there
User avatar
Rachael
Admin
Posts: 12885
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: can't build zdoom properly

Post by Rachael »

Again - let me reiterate.

The SOURCE goes to the ROOT of the checkout - i.e.

Code: Select all

c:\users\you\documents\gzdoom
The BUILD goes to an EMPTY FOLDER - i.e.

Code: Select all

c:\users\you\documents\gzdoom\build
Get into the habit of this too - because this is very standard and expected behavior for nearly all CMake-based projects.
geek-programmer
Posts: 8
Joined: Fri Oct 08, 2021 5:49 pm
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) ARM/PPC/etc
OS Test Version: No (Using Stable Public Version)

Re: can't build zdoom properly

Post by geek-programmer »

Rachael wrote:Again - let me reiterate.

The SOURCE goes to the ROOT of the checkout - i.e. c:\users\you\documents\gzdoom

The BUILD goes to an EMPTY FOLDER - i.e. c:\users\you\documents\gzdoom\build

Get into the habit of this too - because this is very standard and expected behavior for nearly all CMake-based projects.
ok , i gonna try it again ...


i built it in my way but the sound apparently doesn't work

https://imgur.com/xjCCQ8K
Last edited by geek-programmer on Sat Apr 02, 2022 12:38 pm, edited 1 time in total.

Return to “Technical Issues”