C++ Builder XE can't successfully convert project from BCB6 - migration

I am trying to convert old BCB6 project to C++ Builder XE project. Version of development environment is following:
Embarcadero C++ Builder XE Version 15.0.3953.35171
First step was to create blank new project (File -> New -> VCL Forms Application - C++ Builder). After that I added to project all files and all forms from old project and deleted blank form that was auto-created. Second step was to convert AnsiString objects to UnicodeString objects where it was necessary. Then I tried to build the project. Compilation phase ran without the errors. But I am now stuck with linker errors (in BCB6 all was OK):
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external 'Chart::TChart::' referenced from C:\TEMP\WSCS\DEBUG\WIN32\LNG.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxisTitle::SetCaption(const System::UnicodeString)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TCustomAxisPanel::GetSeries(int)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartSeries::SetVertAxis(const Teengine::TVertAxis)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teeprocs::TCustomTeePanelExtended::SetAllowZoom(bool)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxis::SetMaximum(const const double)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxis::SetMinimum(const const double)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxis::SetLogarithmic(bool)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxis::SetAutomatic(bool)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
c:\program files\embarcadero\rad studio\8.0\Bin\CodeGear.Cpp.Targets(2341,5): error : Error: Unresolved external '__fastcall Teengine::TChartAxis::SetDesiredIncrement(const const double)' referenced from C:\TEMP\WSCS\DEBUG\WIN32\F_LOADPOINT_DETAILS.OBJ
How can I resolve these errors? Is something that I am doing erroneously? TChart is standard component both in BCB6 and in C++ Builder XE.

I opened all forms in my project. Right-clicked on them and checked menu item "Text DFM". Now build completes successfully. Its really magic I can't comprehend it.

Related

Failed linking C shared library mod_md.so when compile HTTPD with static cURL

I'm compiling HTTPD 2.4.54 (and its modules) with static cURL.
These are libraries and tools that I use: httpd-2.4.54, apr-1.7.0, apr-util-1.6.1, pcre-8.45, curl-7.83.1, expat-2.4.8, jansson-2.14, lua-5.4.4, mod_fcgid-2.3.9, openssl-1.1.1o, zlib-1.2.12, libxml2-2.9.14, brotli-1.0.9, nghttp2-1.47.0, Gawk v3.1.6-1, CMake v3.23.1, NASM v2.15.05, Visual Studio 2013 Ultimate.
I compiled it in order: zlib, PCRE, Expat, OpenSSL, libxml2, janssonm, Brotli, Lua, APR, APR-Util, Nghttp2. All have been successfully compiled, no errors occurred.
With the cURL, first, I compiled the dynamic cURL (libcurl_imp.lib file). Here's my compiled command line:
cd /D C:\httpd\srclib\curl\bin
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DCURL_USE_OPENSSL=ON -DCURL_USE_SCHANNEL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DHAVE_LDAP_SSL=ON -DENABLE_UNICODE=ON -DCURL_STATIC_CRT=OFF ..
Then I used nmake and nmake install, successful dynamic cURL compiler!
I continued to compile the static cURL (libcurl.lib file) immediately with the following command:
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DCURL_USE_OPENSSL=ON -DCURL_USE_SCHANNEL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DHAVE_LDAP_SSL=ON -DENABLE_UNICODE=ON -DCURL_STATICLIB=ON -DCURL_STATIC_CRT=OFF -DBUILD_SHARED_LIBS=OFF ..
Then I used nmake and nmake install, the compilation successfully, no errors occur.
After compiling cURL, I moved on to HTTPD compilation, here's my compiled command line:
cd /D C:\httpd\bin
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DENABLE_MODULES=i -DINSTALL_PDB=OFF ..
After running nmake later, I encountered an error:
[ 65%] Linking C shared library mod_md.so
LINK: command "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /nologo #CMakeFiles\mod_md.dir\objects1.rsp /out:mod_md.so /implib:mod_md.lib /pdb:C:\httpd\bin\mod_md.pdb /dll /version:0.0 /base:#C:/httpd/bin/BaseAddr.ref,mod_md.so /machine:X86 /INCREMENTAL:NO \phpStudy\Apache\lib\libssl.lib \phpStudy\Apache\lib\libcrypto.lib \phpStudy\Apache\lib\libcurl.lib \phpStudy\Apache\lib\jansson.lib mod_watchdog.lib libhttpd.lib \phpStudy\Apache\lib\libapr-1.lib \phpStudy\Apache\lib\libaprutil-1.lib \phpStudy\Apache\lib\apr_ldap-1.lib ws2_32.lib mswsock.lib \phpStudy\Apache\lib\pcre.lib ws2_32.lib mswsock.lib kernel32.libuser32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:mod_md.so.manifest" failed (exit code 1120) with the following output:
Creating library mod_md.lib and object mod_md.exp
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_global_init referenced in function _md_curl_init
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_slist_append referenced in function _curlify_headers
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_slist_free_all referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_strerror referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_initreferenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_getinfo referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_init referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_add_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_remove_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_wait referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_perform referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_cleanup referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_info_read referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_strerror referenced in function _md_curl_multi_perform
mod_md.so : fatal error LNK1120: 17 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Earlier, I changed a little CMakeLists.txt. Specifically, I have assigned the libcurl.lib file to be a cURL library and print it on the path to the library. I checked and certainly the path was correct.
Then, I checked in the folder C:\phpStudy\Apache\lib both files are libcurl.lib and libcurl_imp.lib are inside.
The above error only occurs when I use the static library file (libcurl.lib file) of cURL. But if I change to a dynamic library file (libcurl_imp.lib file), the compilation will be successful, the compilation process will take place normally.
I tried with adding (and removing) the -DCURL_STATICLIB=ON flag when compiling static cURL. But nothing changed at the linking C shared library mod_md.so step.
What is not right happened to static cURL? Why can't I compile HTTPD with static cURL?

_OBJC_CLASS_$_ShellTask error on objective-c project

I am getting this error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ShellTask", referenced from:
objc-class-ref in PhoneLocator.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Architectures of my target is $(ARCHS_STANDARD)
I have checked online throughout day :(. But I didn't get any solution. How can I resolve this issue.
_OBJC_CLASS_$_ShellTask this error means ShellTask this the file name. When you getting these sort of error it means that the file is missing under your compile sources. Just add that file the error will be gone
In target -> Build Phases -> Compile Sources I had all .m files including those that were giving issue.

Chromium build failed

I'm trying to build Chromium 40.0.2214.111
ninja -C out/Release chrome
But it failed with the error:
FAILED: ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC #obj\device
bluetooth\device_bluetooth.bluetooth_low_energy_defs_win.obj.rsp /c ..\..\device\bluetooth\bluetooth_low_energy_defs_win.cc /Foobj\device\bluetooth\device_blue
ooth.bluetooth_low_energy_defs_win.obj /Fdobj\device\bluetooth\device_bluetooth.cc.pdb
c:\program files (x86)\windows kits\8.1\include\um\bluetoothleapis.h(685) : error C2061: syntax error : identifier 'PFNBLUETOOTH_GATT_EVENT_CALLBACK'
c:\program files (x86)\windows kits\8.1\include\um\bluetoothleapis.h(711) : error C2065: 'BLUETOOTH_GATT_EVENT_HANDLE' : undeclared identifier
c:\program files (x86)\windows kits\8.1\include\um\bluetoothleapis.h(711) : error C2146: syntax error : missing ')' before identifier 'EventHandle'
c:\program files (x86)\windows kits\8.1\include\um\bluetoothleapis.h(711) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files (x86)\windows kits\8.1\include\um\bluetoothleapis.h(713) : error C2059: syntax error : ')'
[8/6758] ACTION Generating C++ API bundle code for function registration
ninja: build stopped: subcommand failed.
I have tried to solve the issue with the google, but I did not succeed

Build failed in Appharbor - The "EnsureBindingRedirects" task failed unexpectedly

I've been trying to build my first application on appharbor through bitbucket, but the build process fails with the following message.
Build started 12/3/2014 7:22:41 PM.
1>Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" on node 1 (default targets).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
The target "MvcBuildViews" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (839,131)" does not exist in the project, and will be ignored.
1>Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" (1) is building "D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj" (2) on node 1 (default targets).
2>PrepareForBuild:
Creating directory "obj\Release\".
2>D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: The "EnsureBindingRedirects" task failed unexpectedly. [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: System.IO.FileNotFoundException: Referenced assembly does not exist. [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: File name: 'D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Net.Http.2.2.28\lib\net45\System.Net.Http.Extensions.dll' [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Roxel.BuildTasks.EnsureBindingRedirects.d__6.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source) [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Roxel.BuildTasks.EnsureBindingRedirects.Execute() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
D:\temp\n5ivm3kq.n2s\input\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets(97,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() [D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj]
2>Done Building Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz.App\BuzzWiz.App.csproj" (default targets) -- FAILED.
1>Done Building Project "D:\temp\n5ivm3kq.n2s\input\BuzzWiz_git.sln" (default targets) -- FAILED.
Build FAILED.
I have tried many things, like updating all the dependent assemblies with the neutral culture in web.config, or including the dll files in the repository, or even changing the project file to include the Condition.Exists in the Import Project tag, but I keep getting an error.
What am I missing?
Regards

CMake / NMake link error on Visual Studio 2012 / vc11

I configured and generated the nmake build files using CMake (2.8.11.2) on Windows 7 64bit for the openmpi 1.4.3 package. I am using the "VS2012 x64 Cross Tools Command Prompt". Unfortunately the link step for the first DLL target fails because some traget libraries are added to the link command line with an '/l' prefix, that causes the linker to issue warnings, but results then in unresolved external symbols, because the needed libraries have been ignored. I.e.
Linking C shared library ..\liblibopen-pal.dll
cd C:\home\re04179\thirdparty\openmpi-1.4.3-build\vc11\x64\release\opal
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E vs_link_dll C:\PROGRA~2\MICROS~1.0\VC\bin\X86_AM~1\link.exe /nologo #CMakeFiles\libopen-pal.dir\objects1.rsp #C:\Users\RE04179\AppData\Local\Temp\nm1B31.tmp
Visual Studio Non-Incremental Link
LINK:
C:\PROGRA~2\MICROS~1.0\VC\bin\X86_AM~1\link.exe /nologo #CMakeFiles\libopen-pal.dir\objects1.rsp /out:..\liblibopen-pal.dll /implib:..\liblibopen-pal.dll.a /pdb:C:\home\re04179\thirdparty\openmpi-1.4.3-build\vc11\x64\release\liblibopen-pal.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO -lWs2_32.lib -lshlwapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST
LINK : warning LNK4044: unrecognized option '/lWs2_32.lib'; ignored
LINK : warning LNK4044: unrecognized option '/lshlwapi.lib'; ignored
Creating library ..\liblibopen-pal.dll.a and object ..\liblibopen-pal.dll.exp
win32.obj : error LNK2019: unresolved external symbol __imp_WSAGetLastError referenced in function win32_insert
evutil.obj : error LNK2001: unresolved external symbol __imp_WSAGetLastError
if.obj : error LNK2001: unresolved external symbol __imp_WSAGetLastError
win32.obj : error LNK2019: unresolved external symbol __imp_WSACloseEvent referenced in function win32_del
win32.obj : error LNK2019: unresolved external symbol __imp_WSACreateEvent referenced in function win32_recompute_event
win32.obj : error LNK2019: unresolved external symbol __imp_WSAEnumNetworkEvents referenced in function win32_socket_event_callback
win32.obj : error LNK2019: unresolved external symbol __imp_WSAEventSelect referenced in function win32_del
win32.obj : error LNK2019: unresolved external symbol __imp_WSAHtonl referenced in function win32_insert
etc.
By editing line 156 of file 'C:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\Platform\Windows-MSVC.cmake' from
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
to
set(CMAKE_C_STANDARD_LIBRARIES_INIT "ws2_32.lib shlwapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
i.e., adding the required libraries explicitly, allows me to build the package successfully, the linker warnings remain, though, and this is certainly only a work-around, but no satisfactory solution to the problem.
You should add libraries to openmpi cmake file and not change CMake files. And you should never change CMake distribution files but rather fix files which accompany a library you are trying to build. Most of the time it is a library's bug not CMake's.