Reputation: 3696
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.
Upvotes: 0
Views: 1744
Reputation: 1417
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;
}
Upvotes: 3