ERROR: Current directory is not a meson build directory - windows

I have been trying to install gtk4 on Windows 10, following the instructions from this site: https://www.collabora.com/news-and-blog/blog/2021/03/18/build-and-run-gtk-4-applications-with-visual-studio/.
After setting up the meson build with the command:
C:\src\gtk>meson setup build --prefix C:/gnome
it shows the build directory at the very beginning of the build system
(see picture).
I tried to compile the meson build with the following instruction:
C:\src\gtk>meson compile -C build
However, I get this error note:
ERROR: Current directory is not a meson build directory: C:\src\gtk\build.
Please specify a valid build dir or change the working directory to it.
It is also possible that the build directory was generated with an old
meson version. Please regenerate it in this case.
Is there a way to fix this problem?
Thanks in advance!

I ran into a similar issue with pulseaudio.
Here running simply
meson build
creates the correct build directory. It was complaining about lots of missing libraries for developers (libsndfile-dev and so on) but after installing it, I was able to compile with
meson compile -C build
So did you check, that you work with the correct meson version of your tutorial link? Is the build directory correctly build? Does it even exist, are there any warnings left, when conifguring it?

Related

When trying to generate an Xcode project from a cmake folder, I get an error related to Xcode new build system

I am trying to generate an Xcode project from a cmake folder, using this very good answer. When executing this command:
cmake -G Xcode <dir of CMakeLists.txt>
I get:
CMake Error in CMakeLists.txt:
The custom command generating
/Users/fofo/Developer/ClientProject/desktop/always_build
is attached to multiple targets:
rake-all
stage
but none of these is a common dependency of the other(s). This is not
allowed by the Xcode "new build system".
CMake Generate step failed. Build files cannot be regenerated correctly.
Can I somehow specify to cmake -G Xcode <dir of CMakeLists.txt> to use the old Xcode build system, or can I somehow solve the problem changing the cmake files?
I have found the answer here. It is possible to use the legacy build system using:
cmake -G Xcode -T buildsystem=1 .

How to build and run C++ API demos in gmsh?

I want to use gmsh C++ API to develop software.
I can build the project using cmake from source file on Ubuntu and get a executable file "gmsh".
My problem is:
How to compile the program as a shared library?
How to compile C++ API demos with the shared library and run it?
May be it is a stupid problems, but I have trapped here for hours.
Is there any step by step instructions can help me?
Oh, the accepted answer link is wrong! This is the right link.
When you use cmake,you must make sure you set ENABLE_BUILD_DYNAMIC to 1.
Here are my commandline on Windows:
cd gmsh_source_code_dir
mkdir build
cd build
cmake -DENABLE_BUILD_DYNAMIC=1 -DENABLE_FLTK=0 ..
cmake --build . --config Release
cmake --install .
You can find gmsh.lib and gmsh.dll in install directory. Then you can develop your software if you import lib or dll in your project.
The detailed instructions can be found at
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api/README.txt

make clean in omnet++ project and version mismatch

I keep getting the following error when running the following project:
when clicking on "Proceed" I get:
from which I don't know what should I do.
Here is the full manifest of the running project:
21:35:18 **** Incremental Build of configuration release for project OSPF ****
make MODE=release all
Node.cc
In file included from Node.cc:8:
In file included from ./Node.h:14:
./traffic_m.h:16:6: error: Version mismatch! Probably this file was generated by an earlier version of nedtool: 'make clean' should help.
# error Version mismatch! Probably this file was generated by an earlier version of nedtool: 'make clean' should help.
^
1 error generated.
make: *** [Makefile:105: out/clang-release//Node.o] Error 1
21:36:15 Build Finished (took 56s.271ms)
Should I change the version? If so, how to do that? My current omnet++
version is 5.4.1.
How to use make clean to fix up my work?
I don't know what "make clean" is nor I know how should I apply that. Would you help me with this please? It's my semester's final project....
Changing the version of OMNeT++ is not necessary.
make clean is an operation that removes C++ object files, final libraries or executables, and other files created during compilation.
What is important: make clean does not remove any of your source file.
To perform make clean just right click on your projekt in Project Explorer and select Clean local.

file cannot create directory using xcode on mac

I am now compiling opencv source codes based on instructions in How to Build OpenCV Static Libraries Mac OS X. I have no problem with creating xcode project with CMake, and compilation goes on well. I can see that static libraries have been created. However, when I use the install function of the project, I receive the following errors:
/Applications/CMake\ 2.8-11.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake
-- Install configuration: "Debug"
CMake Error at cmake_install.cmake:31 (FILE):
file cannot create directory: /usr/local/include/opencv2. Maybe need
administrative privileges.
Any ideas on making installation possible?
I use the following command to make installation succeed:
cd /Applications/Xcode.app/Contents/MacOS/
sudo ./Xcode /Users/***/Desktop/directory_name/open_source/opencv/xcode/OpenCV.xcodeproj

Firebreath Cmake not found when cmake 2.8.8 is installed on MacOsX

When trying to build an xcode project with the following command line:
./firebreath/prepmac.sh projects/ build/
I get:
Using projects in: /Users/uwecerron/Desktop/Node/projects
Generating build files in: /Users/uwecerron/Desktop/Node/build
NOTE: The build files in /Users/uwecerron/Desktop/Node/build should NEVER be modified directly. Make changes in cmake and re-run this script.
~/Desktop/Node/build ~/Desktop/Node
./firebreath/prepmac.sh: line 10: cmake: command not found
CMake failed. Please check error messages
There are no error messages, and i have cmake 2.8-8 installed. Any suggestions on what to do? this is for a kinect project using depthjs.
When you installed cmake it would have ask you if you wanted to install the command line links; you probably accidentally told it not to. Install cmake again and tell it to install the command-line links and it should work fine.

Resources