News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Issue with config codeblock to build file (.so)

Started by console, March 10, 2012, 02:07:52 PM

Previous topic - Next topic

console

Hi all,
I try config code block to build file (.so) but not successful with some error.
I use android-ndk-r7.
This is log:
-------------- Build: Android-Debug in jni ---------------

[ 20.0%] Compiling: ..\android-receiver.cpp
[ 40.0%] Compiling: ..\app-android.cpp
[ 60.0%] Compiling: ..\app-quake3.cpp
[ 80.0%] Compiling: ..\CIrrDeviceAndroid.cpp
[100.0%] Linking dynamic library: ..\..\libs\armeabi\libjni.so
C:/DevTools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: unrecognized option '--output-def=..\..\libs\armeabi\libjni.so.def'
C:/DevTools/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld.exe: use the --help option for usage information
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
0 errors, 0 warnings

Hope to receive help from peoples
Thanks all. :)

MortenMacFly

Why don't you first READ what you post? Especially this:
Quote from: console on March 10, 2012, 02:07:52 PM

ld.exe: unrecognized option '--output-def=..\..\libs\armeabi\libjni.so.def'
ld.exe: use the --help option for usage information

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

console

#2
I don't know how to fix this error. What I must be config to build file (.so) by codeblock  :( ?
Thanks.

MortenMacFly

Quote from: console on March 10, 2012, 03:24:22 PM
I don't know how to fix this bug. What I must be config to build file (.so) by codeblock  :( ?
Thanks.
I don't know what compiler you've selected, hopefully an ARM based one. If so, go to the global compiler options -> select your compiler -> switch to tab "other settings" -> click on  "Advanced options" -> On the tab "commands" select "Link object files to dynamic library" -> remove the option "-Wl,--output-def=$def_output".

Notice that this is ONLY A WILD GUESS! Consult the compiler documentation how to do it properly. Ask in the compiler forum (not the C::B forum) for additional help.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

console

Quote from: MortenMacFly on March 10, 2012, 03:31:30 PM
Quote from: console on March 10, 2012, 03:24:22 PM
I don't know how to fix this bug. What I must be config to build file (.so) by codeblock  :( ?
Thanks.
I don't know what compiler you've selected, hopefully an ARM based one. If so, go to the global compiler options -> select your compiler -> switch to tab "other settings" -> click on  "Advanced options" -> On the tab "commands" select "Link object files to dynamic library" -> remove the option "-Wl,--output-def=$def_output".

Notice that this is ONLY A WILD GUESS! Consult the compiler documentation how to do it properly. Ask in the compiler forum (not the C::B forum) for additional help.
Thank you very much. :)