[eclipse-clp-users] Embedding eclipse with C++ (Xcode): more detail

From: Roman UAB <Roman.Buil_at_...180...>
Date: Thu, 21 Jan 2010 13:30:47 +0100
Thank you for the answer Kish.

I have tried what you said and it does not work. Let me explain what I do and copy all the error message.

I have created a C++ program which calls eclipse in certain iterations. Using Visual I had no problem, I just followed the Embedding manual instructions and everything was ok. Now I moved to Mac and I would like to do the same using Xcode. I have tried to import the project and I think I have followed the embedding manual instructions to configure the Xcode, however I am not sure at all because I am new using Mac. I think there is some error when linking or indicating some path or library, and I don't know if it could be any architecture problem. I installed the i386 eclipse version and I tried to compile using x86_64 and i386 obtaining the same result.

The erro message is:

Ld build/Debug/LR_CP_Aproach normal x86_64
cd "/Users/rbuil/Documents/Roman/Doctorat/Tesis/Xcode Program/LR_CP_Aproach"
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Applications/XCode/usr/bin/g++-4.2 -arch x86_64 -isysroot /Applications/XCode/SDKs/MacOSX10.6.sdk "-L/Users/rbuil/Documents/Roman/Doctorat/Tesis/Xcode Program/LR_CP_Aproach/build/Debug" -L/Applications/Eclipse_6_0_82/lib/i386_macosx "-F/Users/rbuil/Documents/Roman/Doctorat/Tesis/Xcode Program/LR_CP_Aproach/build/Debug" -filelist "/Users/rbuil/Documents/Roman/Doctorat/Tesis/Xcode Program/LR_CP_Aproach/build/LR_CP_Aproach.build/Debug/LR_CP_Aproach.build/Objects-normal/x86_64/LR_CP_Aproach.LinkFileList" -mmacosx-version-min=10.6 -flat_namespace -o "/Users/rbuil/Documents/Roman/Doctorat/Tesis/Xcode Program/LR_CP_Aproach/build/Debug/LR_CP_Aproach"

Undefined symbols:
  "_ec_get_long", referenced from:
      EC_word::is_long(long*) in CLPfunctions.o
  "_ec_resume1", referenced from:
      EC_resume()    in CLPfunctions.o
  "_ec_cleanup", referenced from:
      CIterativeMethod::IterativeBucle_mixtSSG_SG(CJob*, double****)in IterativeMethod.o
      CIterativeMethod::IterativeBucle_SSG(CJob*, double****)in IterativeMethod.o
      CIterativeMethod::IterativeBucle_SG(CJob*, double****)in IterativeMethod.o
  "_ec_term", referenced from:
      term(EC_functor, EC_word, EC_word, EC_word, EC_word)in CLPfunctions.o
  "_ec_panic", referenced from:
      EC_functor::EC_functor(dict_item*)in CLPfunctions.o
      EC_functor::EC_functor(char*, int)in CLPfunctions.o
  "_ec_did", referenced from:
      EC_functor::EC_functor(char*, int)in CLPfunctions.o
  "_ec_refs_destroy", referenced from:
      EC_ref::~EC_ref()in CLPfunctions.o
      EC_refs::~EC_refs()in CLPfunctions.o
  "_ec_set_option_int", referenced from:
      CIterativeMethod::eclipseInitialization()       in IterativeMethod.o
      CIterativeMethod::eclipseInitialization()       in IterativeMethod.o
  "_ec_init", referenced from:
      CIterativeMethod::eclipseInitialization()       in IterativeMethod.o
  "_ec_refs_create_newvars", referenced from:
      EC_refs::EC_refs(int)in CLPfunctions.o
      EC_ref::EC_ref()in CLPfunctions.o
  "_ec_refs_get", referenced from:
      EC_refs::operator[](int)in CLPfunctions.o
      EC_word::EC_word(EC_ref const&)in CLPfunctions.o
  "_ec_string", referenced from:
      EC_word::EC_word(char const*)in CLPfunctions.o
  "_ec_", referenced from:
      operator~(EC_word)in CLPfunctions.o
  "_ec_post_goal", referenced from:
      post_goal(EC_word)    in CLPfunctions.o
  "_ec_long", referenced from:
      EC_word::EC_word(int)in CLPfunctions.o
  "_ec_get_double", referenced from:
      EC_word::is_double(double*)in CLPfunctions.o
  "_ec_refs_set", referenced from:
      EC_ref::operator=(EC_word)in CLPfunctions.o
  "_ec_listofrefs", referenced from:
      list(EC_refs&)    in CLPfunctions.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


I installed the Eclipse IDE for C/C++ Developers to try to use it instead of Xcode, but I have obtained the same error message.

Could anybody tell me how to fix this error?

Thank you in advance.

Roman



El 20/01/2010, a las 04:22, Kish Shen escribió:

> Roman UAB wrote:
>> It seems that the problem is not the library after check some options. Thus, I get this error and I don't know how to fix it. Any help?
>> 
>> Thanks,
>> 
>> Roman
>> 
> 
> Hi Roman.
> 
> I am not quite sure I understand what you mean by 'the problem is not 
> the library'.
> 
> It is difficult to be certain what your problem may be, as you ave not 
> provided a lot of information on what you are doing. However, the 
> "symbols not found" errors are likely due to the difference in the 
> default treatment of namespace visibility -- Mac by default uses a "two 
> level namespace", which is different from the C/C++ on other systems, 
> where all symbols such as procedure names are globally visible. On Mac's 
> two-level namespace, symbols are by default local, so I think this is 
> the cause of the errors you see. To get round this, you need to specify 
> the "-flat_namespace" flag when linking.
> 
> Have you looked at the online documentations provided by Apple on 
> developer.apple.com? I remember finding various documentations there on 
> porting code to Mac OSX.
> 
> Cheers,
> 
> Kish Shen
> 
> -- 
> This e-mail may contain confidential and privileged material for the
> sole use of the intended recipient. Any review, use, distribution or
> disclosure by others is strictly prohibited. If you are not the intended
> recipient (or authorized to receive for the recipient), please contact
> the sender by reply e-mail and delete all copies of this message.
> Cisco Systems Limited (Company Number: 02558939), is registered in
> England and Wales with its registered office at 1 Callaghan Square,
> Cardiff, South Glamorgan CF10 5BT.
> 
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
Received on Thu Jan 21 2010 - 14:52:30 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET