Browse
 
Tools
Rss Categories

Common Windows Compilation Issues

Reference Number: AA-01844 Views: 2638 0 Rating/ Voters

LumenVox provides a number of sample Windows applications, located by default in Program Files\LumenVox\Engine\Examples\, designed to provide example code for new developers who wish to use our API. On Windows, full source code is provided as well Visual Studio project files to make it easier to get started. Examples are provided in both C and C++. 

LumenVox currently builds and tests these in Visual Studio 2008, though they should work in newer versions of Visual Studio. Users may be prompted to "Upgrade" the projects when first opening them in a newer edition of Visual Studio.

Correct Release Architecture

The most common problem that occurs when trying to compile these applications is that the user is attempting to compile them for the wrong architecture. For instance, if you only have the 64-bit LumenVox libraries installed and attempt to compile the application for a 32-bit platform, you may get errors such as the following:

Rebuild All started: Project: SimpleTTSClient_cpp, Configuration: Release Win32
------
Deleting intermediate and output files for project 'SimpleTTSClient_cpp', configuration 'Release|Win32'

Compiling...
stdafx.cpp
Compiling...
SimpleTTSClient_cpp.cpp
Linking...
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol __imp__LV_SRE_Startup
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol __imp__LV_SRE_Shutdown
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_DestroyClient
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_CreateClient
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol __imp__LV_SRE_ReturnErrorString
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_SetPropertyEx
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_SynthesizeURL
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_Synthesize
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_GetSynthesizedAudioBufferLength
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_GetSSMLMarksCount
SimpleTTSClient_cpp.obj: error LNK2001: unresolved external symbol _LV_TTS_GetSynthesizedAudioBuffer
Release\SimpleTTSClient_cpp.exe: fatal error LNK1120: 11 unresolved externals
Build log was saved at "file://g:\1\1\cpp_interface\SimpleTTSClient_cpp\Release\BuildLog.htm"
SimpleTTSClient_cpp
- 12 error(s), 0 warning(s)
==========
Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

If you experience this kind of error, go into the Visual Studio Configuration Manager and make sure that the target platform (i.e. Debug or Release) is set for the correct architecture. For instance, if you are using 64-bit Windows and 64-bit LumenVox, you would expect to see the following:


Checking Environment Variables

Another possibility is that your environment variables may not be configured correctly. These are normally configured system-wide when the LumenVox Engine package is installed, and are defined in the project files. These environment variables are used to point the compiler at the LumenVox libraries that these projects depend upon.

To verify that these are setup correctly, right-click on the project you are trying to compile and choose Properties. Then go to Configuration Properties > Linker > General and make sure that $(LVLIB) is set in "Additional Library Directories:"


You should also verify that the LVLIB variables points to a directory where LumenVox is installed. You can do this by opening a command prompt and typing cd %LVLIB% and verifying that it takes you to the LumenVox Engine installation directory.