Allegro SCAN_DEPEND problems - visual-c++

I am trying to build a project with the allegro-msvc80-4.2.2 pre-built package. I'm using Visual C++ Express Edition 2005 and have added the input library alld.lib and am including allegro.h asp per these instructions:
http://wiki.allegro.cc/index.php?title=Visual_C%2B%2B_Express_2005
When I compile, I get the fatal error:
C1083: Cannot open include file:
'pc.h': No such file or directory
This is because the allegro platform header file "aldjgpp.h" tries to include the nonexistent file (as well as others such as dpmi.h and unistd.h) if SCAN_DEPEND is undefined.
If I try defining SCAN_DEPEND, I get an error from alconfig.h saying "platform not supported."

That error indicates that you are not using the proper header files. The header files that come with the pre-built files are set appropriately.
You should have an include/allegro/platform/alplatf.h file. For MSVC that should have one line:
#define ALLEGRO_MSVC
The best solution is to delete all instance of Allegro source from your computer, and redownload the file. Be sure to check your compiler's directories for stray headers. The following command, as run from the cmd.exe prompt, will help you find any files.
dir /s c:\allegro.h
If you continue to use the old header files, you may run across other problems.
Also, you may want to consider using Allegro 4.2.3, as it is the latest version of the 4.2 series. (Available at http://www.allegro.cc/files/.)

Related

Undefined reference to `PaUtil_GetRingBufferReadAvailable' when compile paex_record_file.c from Portaudio using Eclipse

I need to compile PortAudio's paex_record_file.c file using Eclipse and CDT on Ubuntu 12.04.5 LTS.
Dev libraries (libportaudio-dev) was installed via Synaptic.
I create new Eclipse project and create (copy) this only file to it (so project contains only one user source file 'paex_record_file.c', 1752 2011-09-08 03:21:55).
Then i use Eclipse's Pkg-config to add 'portaudio' (dev) library.
But it not compiles with error
../src/paex_record_file-test.c:47:27: fatal error: pa_ringbuffer.h: No such file or directory
Then source branch taken from git
$ git clone https://git.assembla.com/portaudio.git
./configure
make
sudo male install
But still get same error (no 'pa_ringbuffer.h').
Then during blind trials and errors i use Project - Properties - C build - Settings - Tool settings - Includes, and add '/home/test/portaudio/src/common' path which contains needed .h file, and (this) error disappear.
Question 1: Is this step is correct use of Eclipse settings in this case? (i believe not, because i never need to use this setting before).
But then it shows multiple errors like
/home/doc/prog/paex_record_file-test/Debug/../src/paex_record_file-test.c:110: undefined reference to `PaUtil_GetRingBufferReadAvailable'
and this is unrecoverable.
Question 2. How it can be fixed using Eclipse, BUT without copying all Portaudio source tree to my project?
I have pa_ringbuffer.o file somewhere in system, but no any something like pa_ringbuffer.so files.
I have compiled and running under Eclipse other PA apps which are do not use PA's ring buffer, and just
#include "portaudio.h"
and adding PA lib via PkgConfig is enough.
Thanks.
I had to add those 3 files to source code as well as main.c , then it compiled.
I use Code Block, Mingw c compiler
/portaudio/src/common/pa_allocation.c
/portaudio/src/common/pa_ringbuffer.c
/portaudio/src/os/win/pa_win_util.c
code block IDE view of 3 files added
Please have a look into the portaudio.git :
cd portaudio/
find . -name pa_ringbuffer.h
The reply is : ./src/common/pa_ringbuffer.h
... so you will have to copy the header to a location, where it can be found. But : Do not expect to compile a single file → often not possible with a complex application. I.e. the setup is meant for compiling the complete portaudio/.

FBX Converter - Gear VR

This is a x-post from my question listed at https://answers.oculus.com/questions/583/fbx-converter-gear-vr.html
I'm attempting to use the Oculus FBX converter tool which came bundled with the Oculus Mobile SDK for Samsung Note 4 download.
Unfortunately, FBX Converter appears to be a Windows only tool :(, so I'm attempting to run this via Parallels Desktop.
There's a readme file in the tools dir which contains some instructions for downloading the AutoDesk FBX SDK and moving to an appropriate directory. I've followed them.
Inside the tools dir I see a makefile. Windows does make? Cool, so I attempt to make:
makefile(3) : fatal error U1033: syntax error : '=' unexpected Stop.
Huh... luckily there's a Visual Studio solution here. So I open the .sln and build. Dang, looks like I have to change the Platform Toolset to v110 because I have VS2012. Try again... Ahhh man, bunch of syntax errors about unexpected identifiers in std::max. I guess I'll try and fix it - std::max - expected an identifier
Cool, build is starting and..... ugh. cannot open file libfbxsdk.lib. Wait a second, I bet it's an issue with how the .sln is pulling in it's dependencies. Yup, wrong pathing. Add an extra ../ and here we go.... nope, no dice. cannot open include file fbxsdk.h.
So that's where I am right now. All I really want to do is convert an fbx file to a .ovrscene. Is that so much to ask? Is there a better way to do this? I hope so.
oh.... looks like there's a bin dir with the FBXConvert .exe included in the download. You'll have to add a .dll, to your System32 directory. That was awesome.

Fatal error cannot run 'mt.exe' at compiling VS 2012 C++ project

I upgraded Visual Studio to VS Professional 2012.
Building old Visual C++ projects resulted in the error:
LINK : fatal error LNK1158: cannot run 'mt.exe'
Putting the folder with mt.exe into the path did not help.
Currently I am using mt.exe in the folder C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\x64
Set "Generate manifest" as No in Linker. This helped
As mentioned at fatal error LNK1158: cannot run 'mt.exe', there are times where turning off manifest generation is not an option, because one is actually using manifests.
At which point, one comes back to fixing the actual problem.
One cause of the actual problem is a bad executable search path.
I personally once had a setting for $(ExecutablePath) in the project file (VC++ Directories → Executable directories in the project settings) that was yielding an executable search path one of whose pathnames wasn't a valid directory name.
The pathname had a colon in one of its directory name components (caused by prefixing ..\..\ to another variable, which happened to contain an absolute pathname with a drive letter, rather than a relative pathname as expected).
In a sensible world, errors in path searches caused by merely bad/missing directories cause the pathname to just get skipped over, and the search to proceed to the next pathname in the search path.
link, in contrast, fails with this error (as indeed does midl when it tries to find cl.exe).
This is very confusing when one looks at the search path (with the build output level set to "detailed") and sees that the SDK directory containing mt.exe is right there in it, plain as day.
It seems that link does not live in a sensible world. ☺
The fix was to correct the bad project setting, of course.

Unable to find 'unicode/utypes.h' in icu compile

An earlier attempt to compile ICU for Windows using MSVC and Cygwin worked fine. This time, however, after a successful
.../icu/source/runConfigureICU Cygwin/MSVC
make ends with the following error:
.../icu/source/stubdata/stubdata.c(20) : fatal error C1083: Cannot
open include file: 'unicode/utypes.h': No such file or directory
No problems with the non-MSVC Cygwin version. I am in a different directory, but it seems that this worked before.
Update. I must have compiled it in the icu/source directory before. I went back and did runConfigureICU in-place and did not see the error. I feel sad that I have to ruin my pristine icu folder, but perhaps there is no other way to compile Cygwin/MSVC. It might have something to do with how the Microsoft compiler handles paths.
Update2. making it in icu/source makes the other location work.
The answer to this is that runConfigureICU can only be called for Cygwin/MSVC in the icu/sources directory, otherwise, cl cannot get to the cygwin-based include path.

fatal error C1083: Cannot open include file: 'boost/regex.hpp': No such file or directory

I am getting the following error when i build my code using regex.hpp I am using VS2010 VC++
fatal error C1083: Cannot open include file: 'boost/regex.hpp': No such file or directory
boost\boost_regex-vc71-mt-1_33_1.lib file is here.. is this correct?
It sounds like your include settings do not have the path to the boost installation parent directory.
Look at these instructions: http://www.boost.org/doc/libs/release/more/getting_started/windows.html#build-from-the-visual-studio-ide
and note especially the include directory setup.
You need to make sure that you have included the path to the Boost header files in Visual C++.
Follow the instructions here.
This issue arises because Visual C++ does not include the path to the Boost header files. By including the directory, Visual C++ will search that directory for the problem and hopefully your problem should be solved.
Maybe the error message is true? The file is not there?
If you are in Ubuntu, install the boost library with synaptic, including the regex package. It is not enough with downloading from the boost website and building the regex library in the computer (instructions in http://www.boost.org/doc/libs/release/libs/regex/doc/html/boost_regex/install.html), additionally you have to download it with synaptic. I guess this second redundant step is neccessary because synaptic may update some system variables (the $PATH???) and install some other dependencies that a direct download from www.boost.org does not do.

Resources