PDA

View Full Version : MacOSX and SDL... _main undefined?



shock
10-12-2004, 05:32 AM
Hello,

I've been working on this little project of mine during the past year and I now want to port it from running under windows and linux and linux ppc to my powerbook. Now I got past all those framework issues and included OpenGL, SDL, SDL_net and OpenAL as well as the ODE. Now it compiles smoothly until linkage fails with this error:


ld: Undefined symbols:
_main
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long) const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned long) const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::c_str() const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
std::allocator<char>::allocator[in-charge]()
std::allocator<char>::~allocator [in-charge]()
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::erase(unsigned long, unsigned long)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string[in-charge](char const*, std::allocator<char> const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string[in-charge](std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string[in-charge]()
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string [in-charge]()
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(char const*)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator=(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long)
std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned long)
std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned long)
std::ios_base::Init::Init[in-charge]()
std::ios_base::Init::~Init [in-charge]()
___cxa_begin_catch
___cxa_end_catch
___cxa_rethrow
___gxx_personality_v0
_glGetError
_glu...


Do you guys have any clue to what I am missing here?
I adjusted my main to exactly match the examples on the SDL homepage and included the proper files. I think. If anyone could give me a hint I would be most thankfull.

Timo R.

shock
10-15-2004, 08:23 AM
solved that problem by creating a new SDL-OpenGL App project in Xcode and then impotring all my files from CVS and local space. Some more adjustments and porting ode in newest version to the sys and everything concerning this passed. OpenAL I found after a couple of hours googleing and getting confused by darwinports. *g*

Now the sole linker-error im getting is this:
"Undefined symbols: _mouseButtonState"


ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_mouseButtonState
...failed StandaloneExecutable.LinkUsingFileList /Volumes/HD_2/Projects/NanoOctane2.app/Contents/MacOS/NanoOctane2 ...


I figure that this SHOULD be something out of GLUT ? But Glut is there, and I have a dead end.

Anyone got a pointer?

thx,

Shocky