Code::Blocks

User forums => Using Code::Blocks => Topic started by: dbtsai on January 18, 2006, 08:11:50 pm

Title: undefined reference problem on PPC Ubuntu linux
Post by: dbtsai on January 18, 2006, 08:11:50 pm
Code: [Select]
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `PrepareSystemFunction(asCScriptFunction*, asSSystemFunctionInterface*, asCS criptEngine*)'
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `CallSystemFunction(int, asCContext*, void*)'
/home/build/codeblocks/trunk/src/sdk/.libs/libcodeblocks.so: undefined reference  to `DetectCallingConvention(bool, asUPtr const&, int, asSSystemFunctionInterfac e*)'
collect2: ld returned 1 exit status
make[3]: *** [codeblocks] Error 1

That is from SVN 2006-01-19, and simlply I make it, but I get the above message.

How could I solve it??
I am a first time encounter this problem. Have an idea or patch?

Thanks...

by the way, hi 280Z28,
您好唷~ 您是從中國大陸來的吧?? 我是台灣人, 目前CodeBlocks有沒有中文po? 如果沒有, 我可以效力. 謝謝了.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: tiwag on January 18, 2006, 08:20:13 pm
try

Code: [Select]
make clean
make
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: takeshi miya on January 18, 2006, 08:41:03 pm
lol, that's EXACTLY the same linker errors I get with AngelScript on my Ubuntu x64. Didn't have the (disk) space to check them.

Do you have a 64 bit OS?
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: dbtsai on January 18, 2006, 11:10:26 pm
lol, that's EXACTLY the same linker errors I get with AngelScript on my Ubuntu x64. Didn't have the (disk) space to check them.

Do you have a 64 bit OS?

No, I run it on my ibook. It's a 32 bit powerpc.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: takeshi miya on January 18, 2006, 11:16:29 pm
So it seems AngelScript only compiles fine on x86 32 bits.

It's probable that it's because the functions call optimizations.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: dbtsai on January 18, 2006, 11:34:52 pm
try

Code: [Select]
make clean
make

Still not work.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: dbtsai on January 18, 2006, 11:36:01 pm
So it seems AngelScript only compiles fine on x86 32 bits.

It's probable that it's because the functions call optimizations.

But about one mounth ago, I could compile SVN on my ibook.
What's up?
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: venix on January 23, 2006, 01:20:00 am
#define AS_MAX_PORTABILITY

Add that to your src/sdk/as/source/as_config.h file.
Any place outside of #ifdef's that arent for your specific system would be fine.

I didn't really look for another way of activating that. But it allowed me to compile it with a 64bit system.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: takeshi miya on January 23, 2006, 01:48:13 am
Yes, I've done that, but there are some other things that prevents compiling.
Anyways, I'll make a patch.
And more anyways, having support for fast calls in 64 bits (thus no need for AS_MAX_PORTABILITY) is planned for the next release version.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: venix on January 23, 2006, 02:08:59 am
Yah, just ran into that issue as I tried to run it.  Seems most the problem lies with Angelscript not being 64bit compatible. If you check the WIP (http://www.angelcode.com/angelscript/wip.asp) page, it is first on their todo list.
Title: Re: undefined reference problem on PPC Ubuntu linux
Post by: dbtsai on February 02, 2006, 05:37:51 pm
From
http://www.gamedev.net/community/forums/topic.asp?topic_id=372641

You need to define the compiler flag AS_MAX_PORTABILITY so that AngelScript is built with the generic calling convention. The drawback of this is that all functions registered with AngelScript must use the asCALL_GENERIC calling conventions.

So we may just define AS_MAX_PORTABILITY to solve this problem temporily.