Houdini HDK Library colliding with gcc /clang ? in OSX

   Views 2442   Replies 1   Subscribers 0
User Avatar
Member
1 posts
Joined: Aug. 2013
Offline
I think houdini hdk c++ lib is colliding with gcc 4.2 c++ lib in OSX..

I had gcc 4.2 which was installed from XCode “Command Line Tool” and tried gcc 4.7 or clang but all of them having same error only when I compile c++ files.


ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

and compile command below

gcc -o test test.cpp

Just created this simple code for this test below won't compile.
#include <iostream>
int main(){
std::cout << “SAO” << std::endl;
return 0;
}


if I use only c syntax, it works. but c++ syntax no work…

Using Mac OSX Lion, installed Xcode command line tool for gcc4.2.


Please Help me.
User Avatar
Member
318 posts
Joined: Jan. 2013
Offline
Try to compile programs written in C ++ forcibly specify gcc lstdc++ library and it will compile the program better than g++.

Example:
gcc -o test test.cpp -lstdc++
  • Quick Links