Project

General

Profile

Error compiling Wt on OSX Yosemite

Added by Freddy Martinez Garcia about 9 years ago

Hi guys...

I'm trying to compile Wt in OSX Yosemite because it's look like a great tool and I want to make some test, but I'm getting the following error:

[  0%] Building CXX object src/CMakeFiles/wt.dir/Wt/PopupWindow.o
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/PopupWindow.C:7:
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/WApplication:25:
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/WObject:136:
/usr/local/include/boost/signals2/trackable.hpp:48:43: error: implicit instantiation of undefined template 'boost::weak_ptr<boost::signals2::detail::trackable_pointee>'
      weak_ptr<detail::trackable_pointee> get_weak_ptr() const
                                          ^
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:718:36: note: template is declared here
    template<class Y> friend class weak_ptr;
                                   ^
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/PopupWindow.C:7:
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/WApplication:25:
In file included from /Volumes/Data/freddy/Trabajo-mac/installs/libs/wt/wt-3.3.3/src/Wt/WObject:136:
/usr/local/include/boost/signals2/trackable.hpp:50:18: error: implicit instantiation of undefined template 'boost::weak_ptr<boost::signals2::detail::trackable_pointee>'
          return _tracked_ptr;
                 ^
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:718:36: note: template is declared here
    template<class Y> friend class weak_ptr;
                                   ^
/usr/local/include/boost/smart_ptr/detail/operator_bool.hpp:52:5: note: candidate function
    operator unspecified_bool_type() const BOOST_NOEXCEPT
    ^
2 errors generated.
make[2]: *** [src/CMakeFiles/wt.dir/Wt/PopupWindow.o] Error 1
make[1]: *** [src/CMakeFiles/wt.dir/all] Error 2
make: *** [all] Error 2

I had the boost 1.57 installed from homebrew repository.

what is the problem ???

I'm new with this tool guys...

best regards


Replies (4)

RE: Error compiling Wt on OSX Yosemite - Added by Koen Deforche about 9 years ago

Hey,

You need Wt 3.3.4rc2 for boost 1.57

Koen

RE: Error compiling Wt on OSX Yosemite - Added by Freddy Martinez Garcia about 9 years ago

Hi Koen... after compile the Wt version as you recomend me, the compilation end fine, but now..., I'm trying to run the HelloWord example and the compiler give a link error...

this is my link line in my .pro file, because I use Qt Creator as IDE:

LIBS +=-L/usr/local/lib -lwt -lwthttp -lwttest -lwtfcgi -lwtdbo

his is my link error:

Undefined symbols for architecture x86_64:
  "Wt::WApplication::handleJavaScriptError(std::string const&)", referenced from:
      vtable for HelloApplication in main.o
  "Wt::WObject::setObjectName(std::string const&)", referenced from:
      vtable for HelloApplication in main.o
  "Wt::WApplication::makeAbsoluteUrl(std::string const&) const", referenced from:
      vtable for HelloApplication in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [wt1] Error 1
14:57:38: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project wt1 (kit: Desktop Qt 5.4.1 clang 64bit)
When executing step "Make"

what I'm missing about the configuration ??

PD: Guys, great job with this framework... it's is amazing !!!!!

RE: Error compiling Wt on OSX Yosemite - Added by Koen Deforche about 9 years ago

Hey,

It seems that you are mixing headers/libs of different versions: you are linking against a different set of wt libraries you already installed somewhere?

And you should only link against one of (-lwthttp -lwttest -lwtfcgi), probably -lwthttp, but that will not solve the above error.

Koen

[SOLVE]RE: Error compiling Wt on OSX Yosemite - Added by Freddy Martinez Garcia about 9 years ago

Hi Koen...

after search some information on internet, I had found [[[http://stackoverflow.com/questions/17415564/linking-c-libraries-for-wt-in-xcode]]], whicis is the solution to my problem

best regard

    (1-4/4)