You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<% c++ out() << content.p_main_thread->site_value(content.language,"banner"); %>
Executalbe my_website-old is the old version that runs normally. nm my_website-old | grep site_value prints the following messages:
000000000008f820 T _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
000000000005108e t _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.cold
000000000008d6b0 T _ZN11main_thread17global_site_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
There is no private: std::string site_value(unsigned int language,const std::string &name); defined in my_website.h. I have no idea why the above line with t appears.
nm -D my_website-old | grep site_value prints the following messages:
000000000008f820 T _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
000000000008d6b0 T _ZN11main_thread17global_site_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
nm my_website | grep site_value prints the following messages:
000000000003efb4 T _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
000000000003ef22 T _ZN11main_thread17global_site_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
nm -D my_website | grep site_value prints nothing.
libview-old.so is the old version that runs normally.
Both nm libview-old.so | grep site_value and nm libview.so | grep site_value print the following identical line:
U _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
The problem lies in the most unexpected place - file CMakeList.txt.
The program doesn't crash if I replace the first line cmake_minimum_required(VERSION 3.18) with cmake_minimum_required(VERSION 2.6), which produces the following annoying warnings:
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
My another application that does not use template runs normally with cmake_minimum_required(VERSION 3.18).
Any idea?
---Edit---
I changed 2.0.0.beta2 source files cppcms/CMakeLists.txt and cppcms/booster/CMakeLists.txt by replacing their cmake_minimum_required(VERSION 2.6) with cmake_minimum_required(VERSION 3.18). Then rebuilt and installed cppcms.
Then I rebuilt my application, configured with `cmake_minimum_required(VERSION 3.18)'. My application still crashes.
Hi!
After I made some modifications on
.cpp
and.h
files, the new version of executablemy_website
began to crash and print the following message:/usr/local/bin/my_website/my_website: symbol lookup error: /usr/local/lib/my_website/libview.so: undefined symbol: _ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
c++filt
eats_ZN11main_thread10site_valueEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
and prints the following line:main_thread::site_value(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
my_website.tmpl
contains the following code:<% c++ out() << content.p_main_thread->site_value(content.language,"banner"); %>
Executalbe
my_website-old
is the old version that runs normally.nm my_website-old | grep site_value
prints the following messages:There is no
private: std::string site_value(unsigned int language,const std::string &name);
defined inmy_website.h
. I have no idea why the above line witht
appears.nm -D my_website-old | grep site_value
prints the following messages:nm my_website | grep site_value
prints the following messages:nm -D my_website | grep site_value
prints nothing.libview-old.so
is the old version that runs normally.Both
nm libview-old.so | grep site_value
andnm libview.so | grep site_value
print the following identical line:File
CMakeLists.txt
has been intact:The following
public
method for executablemy_website
has been intact, too.CMakeLists.txt:
option(USE_STATIC_VIEW "Compile view statically" ON)
doesn't preventmy_website
from crash.Any pointer will be greatly appreciated!
The text was updated successfully, but these errors were encountered: