Re: Problem using c++ functions with a custom framework
Re: Problem using c++ functions with a custom framework
- Subject: Re: Problem using c++ functions with a custom framework
- From: amir <email@hidden>
- Date: Sun, 26 Mar 2006 11:51:16 +0200
Subject: Re: Fwd: Problem using c++ functions with a custom framework Date: March 26, 2006 11:11:35 AM GMT+02:00
The following cpp and h file which are included as sources in the framework. In addition the h file is included as a source in the application, the framework project is added to the application project and the framework target is added to "Link binary with Libraries" on the application.
/* * export.h * test2 */
#ifndef __export_h_ #define __export_h_
//extern "C" int FooBar(int temp);
/* class TestClass { public: TestClass(int NewValue); virtual int Kafol(); protected: int m_IntMember;
}; */
#endif
/* * export.cpp * test2 */
#include "export.h"
int FooBar(int temp) { return temp + 1; } /* TestClass::TestClass(int NewValue) { m_IntMember = NewValue; }
int TestClass::Kafol() { return (m_IntMember * 2); }*/
On Mar 23, 2006, at 7:18 PM, Shawn Erickson wrote:
If I add an extern "C" definition before the function than the problem is resolved, however using the C style functions is not an option for me in the original application I was trying to debug (for example because of the fact that I need to export classes as well).
Can you better explain how the function is define and what type of file it is defined in and included in?
-Shawn
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden