platform_vars_macos.mk might be incorrect - gracenote

I've downloaded GNSDK ver.3.2.0.422.
I've tried to build some sample application. But I've got same kind of error like the following...
gcc -arch i386 -m64 -mmacosx-version-min=10.5 -lstdc++ -o sample _output/mac_x86-64/debug/main.o libgnsdk_link.3.2.0.dylib libgnsdk_lookup_local.3.2.0.dylib libgnsdk_storage_sqlite.3.2.0.dylib libgnsdk_manager.3.2.0.dylib -lstdc++ -lpthread -ldl
ld: warning: ld: warning: ignoring file libgnsdk_lookup_local.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_lookup_local.3.2.0.dylibignoring file libgnsdk_link.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_link.3.2.0.dylib
ld: warning: ignoring file libgnsdk_storage_sqlite.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_storage_sqlite.3.2.0.dylib
ld: warning: ignoring file libgnsdk_manager.3.2.0.dylib, file was built for x86_64 which is not the architecture being linked (i386): libgnsdk_manager.3.2.0.dylib
Undefined symbols for architecture i386:
"_gnsdk_link_initialize", referenced from:
__init_gnsdk in main.o
"_gnsdk_link_query_content_free", referenced from:
__fetch_image in main.o
"_gnsdk_link_query_content_retrieve", referenced from:
__fetch_image in main.o
"_gnsdk_link_query_create", referenced from:
__perform_sample_query in main.o
"_gnsdk_link_query_option_set", referenced from:
__perform_sample_query in main.o
"_gnsdk_link_query_release", referenced from:
__perform_sample_query in main.o
"_gnsdk_link_query_set_gdo", referenced from:
__perform_sample_query in main.o
"_gnsdk_link_shutdown", referenced from:
__shutdown_gnsdk in main.o
"_gnsdk_manager_error_info", referenced from:
__display_error in main.o
"_gnsdk_manager_gdo_deserialize", referenced from:
__perform_sample_query in main.o
"_gnsdk_manager_gdo_release", referenced from:
__perform_sample_query in main.o
"_gnsdk_manager_get_build_date", referenced from:
__display_gnsdk_product_info in main.o
"_gnsdk_manager_get_product_version", referenced from:
__display_gnsdk_product_info in main.o
"_gnsdk_manager_initialize", referenced from:
__init_gnsdk in main.o
"_gnsdk_manager_locale_load", referenced from:
__set_locale in main.o
"_gnsdk_manager_locale_release", referenced from:
__set_locale in main.o
"_gnsdk_manager_locale_set_group_default", referenced from:
__set_locale in main.o
"_gnsdk_manager_logging_enable", referenced from:
__enable_logging in main.o
"_gnsdk_manager_shutdown", referenced from:
__shutdown_gnsdk in main.o
"_gnsdk_manager_string_free", referenced from:
__shutdown_gnsdk in main.o
"_gnsdk_manager_user_create", referenced from:
__get_user_handle in main.o
"_gnsdk_manager_user_create_new", referenced from:
__get_user_handle in main.o
"_gnsdk_manager_user_release", referenced from:
__shutdown_gnsdk in main.o
"_gnsdk_storage_sqlite_initialize", referenced from:
__init_gnsdk in main.o
"_gnsdk_storage_sqlite_shutdown", referenced from:
__shutdown_gnsdk in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sample-debug] Error 1
I've checked makefiles and found that platform_vars_macos.mk might be incorrect. They are...
# check cross-compiling setting
ifeq ($(ARCH),)
IMPLDIR = mac
IMPLARCH = x86-64
ARCHFLAGS = -arch i386 -m64 $(MIN_VERSION_OSX_FLAG)
else ifneq ($(filter x86_64 x86-64 x64,$(ARCH)),)
IMPLDIR = mac
IMPLARCH = x86-64
ARCHFLAGS = -arch i386 -m64 $(MIN_VERSION_OSX_FLAG)
I think they should be...
# check cross-compiling setting
ifeq ($(ARCH),)
IMPLDIR = mac
IMPLARCH = x86-64
ARCHFLAGS = -arch x86_64 -m64 $(MIN_VERSION_OSX_FLAG)
else ifneq ($(filter x86_64 x86-64 x64,$(ARCH)),)
IMPLDIR = mac
IMPLARCH = x86-64
ARCHFLAGS = -arch x86_64 -m64 $(MIN_VERSION_OSX_FLAG)
If my thought is correct, please fix them in next release.

Related

Linking error for RInside on Mac OS X 11.6 (Big Bur): pcre2-8 library not found

This is likely an error installing PCRE2 (which I did using "sudo port install pcre2"), but when I "make" sample code for RInside, I get:
$ make rinside_sample0
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include -I/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RInside/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include rinside_sample0.cpp -L/usr/local/lib -F/Library/Frameworks/R.framework/.. -framework R -L/usr/local/lib -lpcre2-8 -llzma -lbz2 -lz -licucore -ldl -lm -liconv -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/Library/Frameworks/R.framework/Resources/lib -lRlapack /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RInside/lib/libRInside.a -o rinside_sample0
In file included from rinside_sample0.cpp:10:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RInside/include/RInside.h:26:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RInside/include/RInsideCommon.h:38:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp.h:57:
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/Rcpp/DataFrame.h:136:18: warning: unused variable 'data'
[-Wunused-variable]
SEXP data = Parent::get__();
^
1 warning generated.
ld: library not found for -lpcre2-8
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rinside_sample0] Error 1
$
Thank you for the comment, Dirk. You got me pointed in the correct direction. I had two old versions of code: pcre2 and Rcpp.
I followed the directions for installing the latest version of "pcre2" here: https://izziswift.com/how-to-install-pcre-development-headers-on-mac-osx/.
I downloaded "pcre" version 10.39, cd'd to that directory, ran:
./configure
make
make install
After that, the examples in RInside compiled, but I got a runtime error:
$ ./rinside_sample0
Error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
Execution halted
$
Some searching showed that error arose from running an older version (1.0.6) of "Rcpp". I went into RStudio, typed "install.packages("Rcpp")" to update to version 1.0.7 and now everything runs!
Hopefully going through these steps will help anyone else who encounters these problems.

Can't install any R packages anymore

I use r for biological data analysis. I'm on a Mac OS Catalina 10.15.4. I recently updated R to version 3.6.3 because I thought that would solve my inability to install a particular package: DESeq2. Huge mistake - amongst the many I've probably made in trying to troubleshoot without really understanding what the problem is. I'm not able to install ANY packages now. I had updated my Clang version when I went down the rabbit hole of potential solutions on the internet. I was going to upgrade gfortran too, but I want to understand what the problem is really before I blindly try more.
Now I've downgraded to R 3.5.3 (I'd like to stick to this R version).
Qst: Using R 3.5.3, how do I successfully install packages from CRAN again? And also from Bioconductor like the DESeq2 package?
Error warning below:
install.packages("readr")
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5:
cannot open URL 'http://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/PACKAGES'
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘readr’
Do you want to attempt to install these from sources? (Yes/no/cancel) y
installing the source package ‘readr’
trying URL 'http://cran.rstudio.com/src/contrib/readr_1.3.1.tar.gz'
Content type 'application/x-gzip' length 268853 bytes (262 KB)
==================================================
downloaded 262 KB
* installing *source* package ‘readr’ ...
** package ‘readr’ successfully unpacked and MD5 sums checked
** libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c Collector.cpp -o Collector.o
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c CollectorGuess.cpp -o CollectorGuess.o
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c Iconv.cpp -o Iconv.o
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c LocaleInfo.cpp -o LocaleInfo.o
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include"
-I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include"
-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC -Wall -g -O2 -c Reader.cpp -o Reader.o
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17:
error: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27:
error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int getsgroups_np(int *, uuid_t);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31:
note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27:
error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int getwgroups_np(int *, uuid_t);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31:
note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31:
error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int setsgroups_np(int, const uuid_t);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31:
note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31:
error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int setwgroups_np(int, const uuid_t);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31:
note: 'uid_t' declared here
typedef __darwin_uid_t uid_t;
^
5 errors generated.
make: *** [Reader.o] Error 1
ERROR: compilation failed for package ‘readr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/readr’
Warning in install.packages :
installation of package ‘readr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/49/18qlr0bn7xg_mk2pzxvrb0f80000gn/T/RtmpN5hCja/downloaded_packages’
Appreciate your help.
I've had the same problem on my Mac! I'm running Mojave. It appears there has been an issue with CRAN recently. Add the following repo argument has worked for me:
install.packages("readr", repo = 'https://mac.R-project.org')
More info: https://community.rstudio.com/t/i-can-t-install-packages-on-r-studio-non-zero-exit-status/52135
I think the problem is the type uuid_t is not defined at anywhere. So the declaration at line 662 in the file /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h will cause error for example.
In the first attempt, I tried to add one line into that unistd.h file:
#include at line 83. But it doesn't help.
Because I don't want to go deeper to edit many system file, I add another line into unistd.h to manually define the type of uuid_t, based on the definition in _uuid_t.h.
typedef __darwin_uuid_t uuid_t; at line 661, after "#endif".
Then it worked.
I am not sure if this is an error in the source code of MacOSX.10.15.sdk or not. But if you want to fix it in this way, please make sure you have the root permission when editing those files.
I relied on these 2 posts to solve my issue:
https://www.nistara.net/post/compile-issues-r/
https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/
Thanks to the Coatless Professor and Nistara Randhawa

Unable to install fortran based packages in R - "gfortran -m32:not found"

I am writing an R package that has Fortran source code. In short, my problem is when I try to install the package I get the error "gfortran -m32: not found" however, I am able compile my code using gfortran -m32 when I'm not installing the package.
Detailed Version:
I have installed the newest version of R(3.1.1) along with the newest version of Rtools(31) and renamed my path variables accordingly (C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\Program Files\R\R-3.1.1\bin\x64;C:\msys;C:\Program Files (x86)\SSH Secure Shell;C:\Program Files\MiKTeX 2.9\miktex\bin).
For testing purposes, I downloaded the PropClust package from CRAN which has Fortran source code.
When I type "R CMD INSTALL PropClust_1.4.tar.gz" after building it, I get the following error:
* installing *source* package 'PropClust' ...
** libs
*** arch - i386
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:202: warning: overriding recipe for target `.m.o'
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:195: warning: ignoring old recipe for target `.m.o'
gfortran -m32 -O3 -mtune=core2 -c PropClustParallelTrials.f90 -o PropClustParallelTrials.o
gcc -m32 -I"C:/PROGRA~1/R/R-31~1.1/include" -DNDEBUG -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O3 -Wall -std=gnu99 -mtune=core2 -c minWhichMin.c -o minWhichMin.o
gfortran -m32 -shared -s -static-libgcc -o PropClust.dll tmp.def PropClustParallelTrials.o minWhichMin.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-31~1.1/bin/i386 -lR
gfortran -m32: not found
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:202: warning: overriding recipe for target `.m.o'
C:/PROGRA~1/R/R-31~1.1/etc/i386/Makeconf:195: warning: ignoring old recipe for target `.m.o'
cygwin warning:
MS-DOS style path detected: C:/PROGRA~1/R/R-31~1.1/bin/i386/Rterm.exe
Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-31~1.1/bin/i386/Rterm.exe
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
no DLL was created
ERROR: compilation failed for package 'PropClust'
* removing 'C:/Users/kamicz/Documents/IsotopeR/PropClust.Rcheck/PropClust'
Although it says "gfortran -m32: not found" I have compiled my code in the same window with the same options(gfortran -m32 -O3 -mtne=core2 -c a.f90 -o a.out) with no problems. Has anyone had this problem before? I am running Windows 7 64-bit if that matters.
I had a similar problem : R was invoking gfortran-4.8 - an unrecognized command on my system - instead of gfortran. This problem was fixed upon creating the file ~/.R/Makevars within my home directory. Here are the contents of Makevars which points to the appropriate gfortran installation:
F77 = gfortran
FC = gfortran
FLIBS = -L/usr/local/gfortran/lib

undefined reference to `tan' but math.h has been included

I want to compile the sample pthread code from http://pages.cs.wisc.edu/~travitch/pthreads_primer.html (Mutex section). As I run this command:
gcc -pedantic -Wall -o theaded_program pth.c -lpthread
which is stated in the link, I get this error
pth.c:45:5: warning: ISO C90 forbids mixed declarations and code [-pedantic]
/tmp/ccajksBv.o: In function `opponent':
pth.c:(.text+0x4a): undefined reference to `tan'
/tmp/ccajksBv.o: In function `main':
pth.c:(.text+0x131): undefined reference to `tan'
collect2: ld returned 1 exit status
However #include <math.h> is there in the code!! The gcc version is 4.6
You should add -lm to your compiler option.
Besides of that, you could also change -lpthread to -pthread.
In the end, it has to be like this: gcc -pedantic -Wall -o theaded_program pth.c -pthread -lm

Installation of Qt Messaging framework in mac?

Can some one explain the steps that are needed to include Messaging framework in to a Qt Application?
I have downloaded the Open source Project that contains the Messaging framework from this link:
http://get.qt.nokia.com/qt/solutions/qt-mobility-opensource-src-1.1.0-beta2.tar.gz
UPDATE:
Raised a bug with Nokia.
http://bugreports.qt.nokia.com/browse/QTSDK-229
Running build steps for project
writemessage... Configuration
unchanged, skipping qmake step.
Starting: "/usr/bin/make" -w make:
Entering directory
/Users/xxxxxxx/Qt/qt-mobility-opensource-src-1.1.0-beta2/examples/writemessage-build-simulator'
g++ -c -pipe -g -gdwarf-2 -arch x86_64
-Xarch_x86_64 -mmacosx-version-min=10.5 -arch ppc -arch i386 -Wall -W -DQT_NO_PRINTER -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../NokiaQtSDK/Simulator/Qt/gcc/mkspecs/macx-g++
-I../writemessage -I../../../../NokiaQtSDK/Simulator/Qt/gcc/lib/QtCore.framework/Versions/4/Headers
-I../../../../NokiaQtSDK/Simulator/Qt/gcc/include/QtCore
-I../../../../NokiaQtSDK/Simulator/Qt/gcc/lib/QtGui.framework/Versions/4/Headers
-I../../../../NokiaQtSDK/Simulator/Qt/gcc/include/QtGui
-I../../../../NokiaQtSDK/Simulator/Qt/gcc/include
-I/Users/xxxxxxx/NokiaQtSDK/Simulator/Qt/gcc/include/QtMessaging
-I/Users/xxxxxxx/NokiaQtSDK/Simulator/Qt/gcc/include/QtMobilitySimulator
-I../../src/global -I../../src/messaging -I/Users/xxxxxxx/install/include -I/Users/xxxxxxx/install/include/QtMobility
-I/Users/xxxxxxx/install/include/QtMessaging
-I../../../../Build/Debug/writemessage/moc
-I. -F/Users/xxxxxxx/NokiaQtSDK/Simulator/Qt/gcc/lib
-o ../../../../Build/Debug/writemessage/messagesender.o
../writemessage/messagesender.cpp g++
-headerpad_max_install_names -arch x86_64 -Xarch_x86_64
-mmacosx-version-min=10.5 -arch ppc -arch i386 -o writemessage.app/Contents/MacOS/writemessage
../../../../Build/Debug/writemessage/messagesender.o
../../../../Build/Debug/writemessage/main.o
../../../../Build/Debug/writemessage/moc_messagesender.o
-F/Users/xxxxxxx/NokiaQtSDK/Simulator/Qt/gcc/lib
-L/Users/xxxxxxx/NokiaQtSDK/Simulator/Qt/gcc/lib
-F/Users/xxxxxxx/lib -L/Users/xxxxxxx/lib -framework Message
-F/Users/xxxxxxx/install/Library/Frameworks
-L/Users/xxxxxxx/install/Library/Frameworks
-framework QtMobilitySimulator -framework QtMessaging -framework QtGui
-L/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib -F/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib -framework QtNetwork -framework QtCore ld: warning: directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -L not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -L not found ld: warning:
directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -F not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -F not found ld: framework
not found QtMobilitySimulator
collect2: ld returned 1 exit status
ld: warning: directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -L not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -L not found ld: warning:
directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -F not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -F not found ld: framework
not found QtMobilitySimulator
collect2: ld returned 1 exit status
ld: warning: directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -L not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -L not found ld: warning:
directory
'/Users/xxxxxxx/install/Library/Frameworks'
following -F not found ld: warning:
directory
'/Installer/______BUILD______PADDED______/ndk/Simulator/Qt/gcc/lib'
following -F not found ld: framework
not found QtMobilitySimulator
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/CP/CP8sR5YZGx0b2xA2gYP5YE+++TI/-Tmp-//ccoxcfz2.out
(No such file or directory) make: ***
[writemessage.app/Contents/MacOS/writemessage]
Error 1 make: Leaving directory
/Users/xxxxxxx/Qt/qt-mobility-opensource-src-1.1.0-beta2/examples/writemessage-build-simulator'
The process "/usr/bin/make" exited
with code %2. Error while building
project writemessage (target: Qt
Simulator) When executing build step
'Make'
Add this to your .pro file:
macx {
LIBS += -framework Message
}
And include headers this way:
#include <Message/MessageExport.h>
This should work with Qt 4.7.

Resources