Is it possible to install SystemC on XCode? If so, how would I do it? Do I just need to set up some libraries and point xCode at them? I've set up openGL on xcode before but, I can't similar looking libraries for SystemC.
I tried following the top voted instructions in the link suggested and got these errors on the make install command:
...
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
../../libtool: line 1096: cd: .libs/libsystemc.lax/libkernel.a: No such file or directory
make[3]: *** [libsystemc.la] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
I got the same error trying the other instructions.
In order to use SystemC with xCode, you have to build the library first. You can follow instructions #rmaddy suggested : how to use and install SystemC in terminal mac OS X?
I suppose you installed SystemC (result of make install) in /usr/local/systemc and so you have /usr/local/systemc/include containing SystemC headers and /usr/local/systemc/lib-macosx64 containing the library.
Create a new xCode project. File -> New -> Project. Choose OS X / Application and finally Command Line Tool for example. Add a product name (SystemCExample) and choose C++ language.
Select your target (SystemCExample) on the left panel and then be sure you selected your target in the top left list (and not the project). Select the area Build Settings and under Search Paths you will find Header Search Paths. Click on the "+" and add SystemC headers path (/usr/local/systemc/include).
Then, select the section Build Phases and either add the path manually or drag and drop the static (libsystemc.a) or dynamic version (libsystemc.dylib) of SystemC library you can find in /usr/local/systemc/lib-macosx64 in Link Binary with Libraries part.
Finally, just add a minimalist SystemC code and press the build and run button:
#include <systemc>
int sc_main(int argc, char *argv[]) {
std::cout << "Hello, World!\n";
sc_core::sc_start();
return 0;
}
Related
I seem to be having an issue with macOS SDK headers on the command line after upgrading to Xcode 10. I know Apple added macOS_SDK_headers_for_macOS_10.14.pkg in /Library/Developer/CommandLineTools/Packages, which I have installed - but unfortunately that doesn't seem to have helped. Are there any other changes in Xcode 10 I may have missed?
Here is the log:
20:54.19 In file included from /Users/<user>/Workspace/modules/brotli/enc/backward_references.cc:9:
20:54.19 /Users/<user>/Workspace/modules/brotli/enc/./backward_references.h:12:10: fatal error: 'vector' file not found
20:54.19 #include <vector>
20:54.19 ^~~~~~~~
20:54.23 1 error generated.
20:54.23 make[5]: *** [host_backward_references.o] Error 1
20:54.23 make[4]: *** [modules/brotli/host] Error 2
20:54.23 make[4]: *** Waiting for unfinished jobs....
I encountered this after upgrading to Xcode 10 on a project that depends on libstdc++ (and for reasons not relevant to the present discussion, cannot be upgraded to libc++).
Since Xcode 10 removes support for libstdc++, I had to copy the relevant assets from an old installation of Xcode 9. (Thankfully I had an old machine handy to do so.)
I had to take the libstdc++.6.0.9.tbd binary (and recreate the symlinks libstdc++.6.tbd and libstdc++.tbd pointing to it) from:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/
into the same place on the new, Xcode 10 machine.
In addition, I had to copy over the C++ headers at:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/
I am trying to build a program that relies on wxWidgets to run properly. I have the latest version of Xcode installed. I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). However, in both cases, running the makefile for the main program gives the following error:
make: /Users/path to wxWidgets/wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? Or is that something I need to build separately? If it is separate, how would that be done?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read:
../configure --with-osx_cocoa --with-macosx-version-min=10.7
--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
--prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++
There is one error while building wxWidgets:
../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type
'wxNSAppController *'
[NSApp setDelegate:appcontroller];
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. Thank you very much in advance.
Similar question. I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/".
I'm trying to install cutecom on OSX Mavericks but I'm getting some erros.
Here are the steps that I followed.
install qt through brew
brew install qt
update path on .bashprofile
export PATH=/usr/local/Cellar/qt/4.8.6/bin:$PATH
extract files of cutecom
compile source code of cutecom
$ mkdir build
$ cd build
$ cmake ..
$ make
And the output of make is:
[ 20%] Generating ui_cutecommdlg.h
/Users/kc/Downloads/cutecom-0.22.0/cutecommdlg.ui: Warning: The form file has external pixmaps or qPixmapFromMimeSource() set as a pixmap function. This requires Qt 3 support, which is disabled. The resulting code will not compile.
[ 40%] Generating moc_qcppdialogimpl.cxx Scanning dependencies of target cutecom
[ 60%] Building CXX object CMakeFiles/cutecom.dir/main.cpp.o
In file included from /Users/kc/Downloads/cutecom-0.22.0/main.cpp:21:
In file included from /Users/kc/Downloads/cutecom-0.22.0/qcppdialogimpl.h:22:
/Users/kc/Downloads/cutecom-0.22.0/build/ui_cutecommdlg.h:12:10: fatal error:
'Qt3Support/Q3MimeSourceFactory' file not found
#include <Qt3Support/Q3MimeSourceFactory>
^
1 error generated.
make[2]: *** [CMakeFiles/cutecom.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/cutecom.dir/all] Error 2
make: *** [all] Error 2
Any suggestions ?
Thank you very much for your time.
Kostas.
The Qt package you have is missing Qt3Support (on purpose). This component is necessarily for some Qt4 software that still uses deprecated features dating back to Qt3.
Based on the documentation I've been able to find online, you should be able to reinstall Qt4 with the extras you need using a command like this:
brew install --with-qt3support qt
I am trying to compile PJSip for iPhoneSDK 5.1. I am running Lion 1.7.3 and Xcode 4.3.3. I did not find any helpful information about compiling it. I am not even sure it's got support for the iphonesdk 5.1. I didn't get any information about it on the project's website. I am not sure if something changed in the compiler from the last iPhoneSDK release but these are the errors i'm getting
I followed the steps on the project's website I change the config_site.h added the lines
#define PJ_CONFIG_IPHONE 1
#include <pj/config_site_sample.h>
Then moved the header to the location pjlib/include/pj/
I the configure-iphone file i've change the line
./aconfigure --host=arm-apple-darwin9 --disable-floating-point --disable-sdl $*
to
./aconfigure --host=arm-apple-darwin10 --disable-floating-point --disable-sdl $*
sow it would compile for iPhoneSDK 5.1
when i rune the configure-iphone everything i get no errors but when i run make sep i get this errors at samples.mak
make -f Samples.mak depend
make[2]: Nothing to be done for `depend'.
and while running make
"_pjsua_aud_subsys_start", referenced from:
_pjsua_media_subsys_start in libpjsua-arm-apple-darwin10.a(pjsua_media.o)
"_pjsua_vid_subsys_start", referenced from:
_pjsua_media_subsys_start in libpjsua-arm-apple-darwin10.a(pjsua_media.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
make[2]: * [../bin/pjsua-arm-apple-darwin10] Error 1
make[1]: * [pjsua] Error 2
make: * [all] Error 1
Did anybody solve this problem , or can provide a solution to compile Pjsip for iphonesdk5.1 whit Xcode 4.3.3.
type ./configure-iphone in terminal at your pjsip directory
remember to install command-line tool via Xcode
when configure is done
try to make dep && make clean && make
I am compiling the QCA Library for windows and using the steps from INSTALL File for for configure I am using the following command in windows console:
configure.exe --qtdir=C:\QtSDK\Desktop\Qt\4.7.3\mingw
The response is:
Configuring Qt Cryptographic Architecture (QCA) ...
Reason: There was an error compiling 'conf'. See conf.log for details.
I am trying to compile using Qt in windows directly and shows the following error:
-I"c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\ActiveQt" -I"release" -I"." -I"c:\QtSDK\Desktop\Qt\4.7.3\mingw\mkspecs\win32-g++" -o release\mlock.o ..\..\Encryption-QCA\src\botantools\botan\ml_win32\mlock.cpp
In file included from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/objbase.h:73,
from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/ole2.h:9,
from c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/windows.h:114,
from ..\..\Encryption-QCA\src\botantools\botan\ml_win32\mlock.cpp:37:
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/objidl.h:95: error: expected unqualified-id before string constant
mingw32-make[2]: Leaving directory `C:/Users/AlejoLina/Documents/Alejandro/Compacta/SE-HA_Tool/Encryption-QCA-build-desktop/src'
mingw32-make[1]: Leaving directory `C:/Users/AlejoLina/Documents/Alejandro/Compacta/SE-HA_Tool/Encryption-QCA-build-desktop/src'
mingw32-make[2]: *** [release/mlock.o] Error 1
mingw32-make[1]: *** [release] Error 2
mingw32-make: *** [sub-src-make_default] Error 2
The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project qca (target: Desktop)
When executing build step 'Make'
Thanks in advance for the help
I can't say for sure that this is your problem but you may want to try using the make that is available with MSYS. I've always had better success with it. From MinGW's own FAQ..
The "native" (i.e.: MSVCRT dependent)
port of make is lacking in some
functionality and has modified
functionality due to the lack of POSIX
on Win32.
The problem in the configure was that the executable doesnt find the windows make (mingw-make).
The solution is to put the right path to the envinronment variables (qt and mingw bin path).