After struggling with installing Wt and getting all options I wanted installed, I decided I wanted to try and share my experiences in case it helps anyone else that is struggling whit this. This is what I think made Wt work in Qt Creator on my MacBook Retina with OSX 10.9 Mavericks. There are no huge changes to the original guides, but there are a few things that differ, and I try to explain why I decided to do it this way.
I started off on the Wt wiki’s install instruction page here: http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_Mac_OS_X_Leopard I am going to paste the steps, then add my comments and alterations, I will also explain how I set this up to work on Qt Creator 3.0.1, based on Qt 5.2 (the presently newest qt on http://qt-project.org/downloads). I will also try and say something about why I altered things, even though it doesn’t always make sense to me, it still seems to be what made this work for me. I have certainly tried a lot of different things, so if a step mattered that I didn’t include, only you can help me discover what this is, and hopefully we will have a good guide in the end :) first: Requirements Get Xcode to get the compilers and basic libraries. Get CMake. Download Boost 1.41.0 (or later). Comment: Yes, apparently there are some tools and libraries in Xcode that are necessary, because they are installed system wide. I still haven’t succeeded with compiling on Xcode, but I dont know where to set all the settings which Wt needs. Boost is currently on version 1.55, and if you do have Homebrew installed on you Mac, you should be able to brew install boost and then your able to proceed directly to the building Wt part of this section. If you dont, I dont know if MacPorts has Boost, and I will leave that up to someone else to figure out. By chance I happen to have Homebrew, but I didn’t know I could bee Boost at the time, so I went through the whole section on the site $ echo 'using clang ;' > ~/user-config.jam $ cd boost* $ ./bootstrap.sh $ sudo ./b2 --toolset=clang cxxflags="-stdlib=libc++ -std=c++11" linkflags="-stdlib=libc++" install Comment: I think these instructions are enough to get Boost up and running. For anyone not used to terminal, you’re usually in your home directory when the terminal window opens, and then the above instructions should get you into the boost directory. If you have set your system to download to a custom folder, you are on your own, but its not hard to figure out how to get there. Building Wt Get the latest Wt version. $ cd wt-3* $ mkdir build $ cd build $ cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++' \ -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc++' \ -DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc++' \ -DWT_CPP_11_MODE='-std=c++11' ../ $ make $ make -C examples # to build the examples Comment: At first I installed both boost and Wt in custom directories, but I will not explain how to do this. It certainly has some benefits, but the ones of you that really need that option really doesn’t need my little novice guide here, its for people like me that are just starting out figuring these things out. So, this will fail by default, unless you have set custom directory where you have writing permission without being root (sudo or sudo su). This is what I did: $ cd .. $ mkdir build $ cd build $ cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS='-stdlib=libc++' -DBOOST_DIR=/opt/local -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_MODULE_LINKER_FLAGS='-stdlib=libc++' -DWT_CPP_11_MODE='-std=c++11' ../ $ sudo make $ sudo make install $ sudo make -C examples $ sudo make install $ make clean why: -DBOOST_DIR=/opt/local - because I had some problems with getting cmake to auto detect boost at one time, and this solved it. -DCMAKE_OSX_ARCHITECTURES=x86_64 - this is because I want to make sure I dont get the error: can’t find symbols to match architecture x86_64 sudo make install - because Wim Dumon said I needed to do make install, and I added sudo because of permission conflicts. make clean - to clean your build directory. If you want any optional libraries installed, make sure you have the software installed already before running cmake. I wanted the MySQL backend installed, so I installed MySQL community version from their homepage, but still it would not build. Then I removed it and did: brew install mysql That solved it. You should make sure you read the messages generated by cmake to see if everything you want installed is going to be built. Sometimes its even better to delete the wt* directory, and start all over if you encounter a few problems. I certainly did that a few times. I also think anything installed through Homebrew is easily detected by cmake, which certainly helps a lot. Then I want to explain a few things bout setting this all up in Qt Creator; First of all, you should visit Richel Bilderbeek’s page about Wt in Qt, he has explained deployment very well, and he has a few very nice examples to show you Wt. I think these are good tutorials to start off with, and the deployment settings are essential. Link: http://richelbilderbeek.nl/CppWt.htm Richel explains a bit about how you set up the *.pro file in Qt, but Ill include my own settings that will probably be similar to every other OSX Mavericks computer that has installed Wt according to these instructions. INCLUDEPATH += /usr/local/include LIBS +=-L/usr/local/lib -lwt -lwthttp -lboost_signals QMAKE_CXXFLAGS += -DNDEBUG Comment: INCLUDEPATH: - The path to the Wt and Boost folders that contain all the header/#include files. LIBS: - The path to all the Boost and Wt *.dylib files, and the library your utilizing. The rest of the *.pro settings are to be set according to Richel’s instructions. Qt Projects tab: For the Run Arguments, Richel has set a good basic string on his homepage, I would recommend the Wt Wiki generic Unix install instructions page for more options, and most programs I run without «run in terminal». I have experienced that I had to turn off the «shadow build» option in the Build section. Sometimes you have to configure the compiling kit for Build/Run, I have had to do that on my Raspberry Pi at least, so Ill just toss in the link to where you find a good guide for this: http://www.engineersgarage.com/embedded/raspberry-pi/how-to-install-qt-in-raspberry-pi For a while I was troubled with the error message that the system could not find symbols for architecture x86_64, and I searched a bit to solve this (a few weeks actually before it seems I solved it). Several places mention going into every projects make file, altering Mac OSX version from 10.6 to 10.9 everywhere its mentioned. The other thing that might solve this is the x86_64 option in the cmake string. If its both or non, or one. I really can’t say for sure. CROSS COMPILING: Again I followed the instructions from Wt Wiki: http://redmine.webtoolkit.eu/projects/wt/wiki/Cross_compile_Wt_on_Raspberry_Pi I think these instructions are meant for Ubuntu, and in all honestly, I haven’t cross compiled yet, but I had a lot of problems mounting the RPi as a folder in my MacBook file system, but I managed and I want to share a bit of how and why, then get back to you when I get around to do the sections after the sshfs part. I have built the cross compiling tools using the instructions on the page, no problem. But in section 3 from the Wiki: Make raspberry pi development files (header files, libraries) available on the host On your cross compilation host, use sshfs to mount your complete raspberry pi: # make sure that you've logged out from your rpi, execute these commands in on your host computer: mkdir ~/mnt_rpi sshfs pi@rspberrypi:/ ~/mnt_rpi/ -o transform_symlinks Comment: At first I put the mnt_rpi directory in my home directory, and then I had to sudo sshfs to mount the RPi, and as it mounted, the folder disappeared. I could see it in terminal, but not in finder, and if I tried cd mnt_rpi I was answered that this directory didn’t exist.. Then I had to use diskUtil to unmounDisk to release it… a mess. But in the end, I learned that i could see and enter the folder as root, and reasoned that it came from me having to "sudo sshfs" to mount the RPi in mnt_rpi under my home directory. But if I made mnt_rpi under Volumes, I could sshfs mount the RPi without sudo. So here is my alternative for Mavericks (probably other OSX as well): Make raspberry pi development files (header files, libraries) available on the host On your cross compilation host, use sshfs to mount your complete raspberry pi: # make sure that you've logged out from your rpi, execute these commands in on your host computer: <- this dont seem to matter really mkdir /Volumes/mnt_rpi sshfs p...@ip.add.re.ss:/ /Volumes/mnt_rpi/ -o transform_symlinks I hope this is helpful for someone, and if these instructions are incomplete, Ill be happy to be told, and please reply to this with corrections. After all, this is what I think solved it for me, and I have a feeling that Mac users usually encounter some problems following the existing guides, mine are really an attempt on writing the same for Dummies. I also suspect that most people using Wt are on Linux systems, which is similar, but really not the same as OSX. Resulting in a few small differences that I guess a Linux user would see and solve a bit faster than your common OSX user.
signature.asc
Description: Message signed with OpenPGP using GPGMail
------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest