nmake or makefile cannot find directory - visual-studio

Hello I'm trying to build intel's tbb (threaded building blocks) from source. I have downloaded and extracted the source. I point visual studio's command prompt to the directory of extraction, where there is a makefile. I have edited the tbb_root variable inside the make file to point at the extracted directory, but when I tried running it I get
Makefile(28) : fatal error U1052: file '$(tbb_root)/build/common.inc'
not found Stop.
Lines 27 and 28 of the make file are as follows (all previous lines are comments/whitespace)
tbb_root=c:/tbb_extract/tbb42_20140122oss
include $(tbb_root)/build/common.inc
I have verified that c:/tbb_extract/tbb42_20140122oss/build/common.inc exists, so why does this fellow not make!
Thanks
Thomas

You need to use GNU make in order to build TBB from sources; nmake is not supported, and never was.

I'm not very familiar with nmake but according to the documentation it doesn't use include to include files. Try using !INCLUDE instead.

The answer was simple one - the file seems to of been assembled a kind of half GNU half VS-style makefile. It was a cannibalisation and I don't think it was ever tested.

Related

no pdcures.dll created when using make -f Makefile for win 10 pdcurses

I have been trying to install PDcurses on my Windows 10 machine. The README.md says to run: make -f Makefile to build pdcures.dll in the 'wincon' folder. However when i ran this in Powershell it did not create any .dll, instead creating many .o files.
Then i tried to run 'make -f Makefile.wcc' in Powershell and it returned the error 'makefile.wcc:9: *** missing separator. Stop.' I got similar errors using Makefile.bcc and Makefile.vc.
What am i doing wrong here? Am i supposed to build one of the .c files?
Each of the Makefiles is compiler-specific, as described in the README.md. There's no reason to try Makefiles intended for compilers other than the one you're using.
The Makefile doesn't build a DLL, by default -- only a static library (ending in .a or .lib). PDCurses is a small library, and there's not much benefit in building it as a DLL. But if you want to, that procedure is also described in the README.md. In short:
make DLL=Y
but please read the file for details. Note that, even if you build PDCurses as a DLL, you'll still also need the .a or .lib file to link against.

How to run program using OpenMesh

I have read through most of OpenMesh's documentation, and am lost in how to run a simple program using OpenMesh. I followed the tutorial for making a basic cube and building the project: http://www.openmesh.org/media/Documentations/OpenMesh-6.2-Documentation/a00068.html but nowhere do they mention how to RUN the program. The tutorial says to put the file that makes the cube in a particular folder: http://www.openmesh.org/media/Documentations/OpenMesh-6.2-Documentation/a00066.html and I did this. It clearly compiled the code when I built it with cmake and make. After that I am lost.
Assuming you used the CMakeLists.txt as given in the page you linked as-is, the linker should create a file MyOwnProject within the directory where you executed cmake and then make. That's your executable. To run your program, execute that file, either by double-clicking it within a file manager (Explorer, if you are on Windows) or by typing ./MyOwnProject on a Linux command line.

Compiling and embedding lua into a C++ application

For portability reasons, I'd like to compile lua from source when I compile my C++ code. I use lua to read input file.
If I understand correctly, lua's readme mentions that it's possible to do that through src/Makefile. I can't really read it that well. Has anyone figured out how to do it?
is it possible to have it in one command? gcc ....
bonus: how to put it in cmake ?
Lua has a makefile that needs your target platform to build to so you will need to specify make [target platform].
But that is right in the beginning of the readme.
You could try to call the make command from inside your build process.
Cheers
[UPDATE based on the comments]
If you use:
make a PLAT=[target platform]
on the command line in the src directory it will only build the liblua.a library for the target platform then you will just need to copy that file to wherever you need and link against it.

Using Google's ProtoBuf (and a .proto file) to create a Python API Library

I have the .proto file used in the open-source Android API (http://code.google.com/p/android-market-api/), and am having some trouble compiling the file to generate the .py.
I'm trying to follow the instructions here, https://developers.google.com/protocol-buffers/docs/pythontutorial , and am on the steps that are under the header "Compiling Your Protocol Buffers".
I've downloaded the compiler, protoc.exe. The readme says "To install, simply place this binary somewhere in your PATH," which I'm not understanding. I'm messed around with it for a while now, but can't think of how to proceed.
I'm quite the novice programmer, so please tell me if something isn't clear, or if I'm having some sort of fundamental misunderstanding... about anything. I'm on Windows 7 by the way.
Thanks!
if protoc.exe is not in the same directory you're calling it from, you need to add it to your PATH environment variable to be accessible from the calling directory when you're in the shell. open up a command shell and execute:
set PATH=%PATH%c:\directory\to\proto\executable;
then change directories over to where your source code is and execute the compilation line as instructed from the google page.
I had the same problem because it is not written that clear in the README.txt. What they mean is to:
1. take the protoc.exe and put it in the same folder with the other files of your project.
2. open the cmd to that directory and run: protoc --cpp_out=. myfile.proto
=> This will create the 2 new files in the folder with the files of your project, and then you can add them normally to your program.
This helped me: http://www.scriptol.com/programming/protocol-buffers-tutorial.php
This is for c++, but I guess it will be something similar for python; I guess you just have to change the command you are using in the cmd :)

Configuring Bison to compile an input file under Visual C 6

I'm trying to get Bison to do it's thing in VC6. I'm sure this must be a problem with my configuration. At the moment I have a Custom Build step as follows.
<Commands>
echo Start parser generation
"C:\GnuWin32\bin\bison.exe" $(InputPath)
echo Finish parser generation
<Outputs>
$(ProjDir)\$(InputName).c
$(ProjDir)\$(InputName).h
The error I get is "C:\GnuWin32\bin\bison.exe: m4: No such file or directory", which makes me think the m4.exe doesn't exist or isn't on the path, but I can run the exact same command from CMD in the same directory with no errors.
This thought process makes me think it's a problem with the output options, but I've tried various configurations with no luck.
Any help would be great, thanks in advance.
Edit: I've added some more visual studio versions to the tag list to try to get some more exposure for the question. Hopefully someone will have done this in a later version and I can work backwards.
Okay, I've managed to slove this in a very round-about way but I will try my best to document it here.
It seems that VC6 Custom build options will only look in the project directory for the m4.exe, even when you specify where the calling exe (bison) is explicitly. To solve this I did a bit of a hack and did a full cd command in the custom build window to get to the gnuwin32 directory (where both bison and m4 live) before trying to call the parser generator.
This works fine but is a bit of a hassle for trying to distribute it to other people when they may have installed GNU tools to a different location.

Resources