#Build for Release done but faild

41 messages · Page 1 of 1 (latest)

sterile drum
#

I build the project for release and and it work, cmake says that works but there is no build folder for release

hoary sonnetBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

sterile drum
#
cmake_minimum_required(VERSION 3.10)
project(Lizon)

find_package(wxWidgets REQUIRED COMPONENTS core base)

include(${wxWidgets_USE_FILE})

add_executable(Lizon mframe.cpp main.cpp)

target_link_libraries(Lizon ${wxWidgets_LIBRARIES})```
#

.
├── assets
│ ├── cpu.png
│ ├── dif1.png
│ ├── dif2.png
│ ├── dif3.png
│ ├── dif4.png
│ ├── icon.ico
│ ├── konsole.png
│ ├── mic1.png
│ ├── music.png
│ ├── ram.png
│ ├── temp.png
│ └── vscode.png
├── build
│ ├── CMakeCache.txt
│ ├── CMakeFiles
│ ├── cmake_install.cmake
│ ├── compile_commands.json
│ ├── Lizon
│ └── Makefile
├── CMakeLists.txt
├── main.cpp
├── main.h
├── mframe.cpp
├── mframe.h
└── README

pulsar orbit
#

You need two commands to build. First yours, then cmake --build . -j8

sterile drum
#

''First yours" what you mean?

#

and I need to build for RELEASE

pulsar orbit
#

You need to run two commands

#

You already ran one, then you need to run the one I gave you

sterile drum
pulsar orbit
#

Yes

#

Which is what you want, no?

sterile drum
#

build for release

#

I don t want a normal build

#

I need to create a .exe file for my program

pulsar orbit
#

.exe is created regardless of it being release or debug build

#

You selected the release build in the first command. Then the second commands makes whatever build you selected

sterile drum
sterile drum
pulsar orbit
#

You could always copy them manually

#

Or make a script that copies them and zips the executable + the pngs

#

The "official" way of doing this is adding -DCMAKE_INSTALL_PREFIX=some_dir to the first command, and running cmake --install . after the last command. Then it should copy everything to that directory, which you can then zip

#

But you might need to list things that need to be copied in your CMakeLists.txt

sterile drum
#

so I think that I can solve that

pulsar orbit
#

Simple, don't use paths like that 😛

#

Get a location of the executable itself (which is done in a platform-dependent way, sadly), and load images relative to that

valid spoke
#

do you add your lib into the enviroment path rigitly?

#

you can try to use "include_libraries"

sterile drum
#

I tried but not succesful

#

I create a dist folder for release

#

├── bin
│ └── Lizon
└── share
├── cpu.png
├── dif1.png
├── dif2.png
├── dif3.png
├── dif4.png
├── icon.ico
├── konsole.png
├── mic1.png
├── music.png
├── ram.png
├── temp.png
└── vscode.png

#

but my app did't find tha pngs

pulsar orbit
#

You need to get the location of the executable, to load images relative to that

#

Google how to do that on your OS