Codeblocks compile problem

Codeblocks compile problem
0

Hi!.
after a while of success process of creating my project and cmake stuffs, it generated codeblock project file… now, i open it and compiile, but errors are throwing on the screen, any tips? (Linux Debian Buster)

Thks

There must be another error further up the log?

Also what version of gcc and cmake?

cmake version is 3.13.4
gcc version is 8.3.0

I could not see any other log, just some warning.

There are some output i have missed

recompile con -fPIC
/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(raster.linux64.o): relocation R_X86_64_32S against símbolo ft_raster1_renderer_class' can not be used when making un objeto PIE; recompile con -fPIC** **/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(autofit.linux64.o): relocation R_X86_64_32 against .rodata’ can not be used when making un objeto PIE; recompile con -fPIC
/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(pshinter.linux64.o): relocation R_X86_64_32S against .text' can not be used when making un objeto PIE; recompile con -fPIC** **/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftglyph.linux64.o): relocation R_X86_64_32S against símbolo ft_bitmap_glyph_class’ can not be used when making un objeto PIE; recompile con -fPIC
/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftstroke.linux64.o): relocation R_X86_64_PC32 against símbolo memcpy@@GLIBC_2.14' can not be used when making un objeto PIE; recompile con -fPIC** **/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftgzip.linux64.o): relocation R_X86_64_PC32 against símbolo memcpy@@GLIBC_2.14’ can not be used when making un objeto PIE; recompile con -fPIC
/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftlzw.linux64.o): relocation R_X86_64_32S against .text' can not be used when making un objeto PIE; recompile con -fPIC** **/usr/bin/ld: cocos2d/external/freetype2/prebuilt/linux/64-bit/libfreetype.a(ftbitmap.linux64.o): relocation R_X86_64_PC32 against símbolo memcpy@@GLIBC_2.14’ can not be used when making un objeto PIE; recompile con -fPIC
/usr/bin/ld: falló el enlace final: nonrepresentable section on output
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Process terminated with status 1 (1 minute(s), 41 second(s))
1 error(s), 5 warning(s) (1 minute(s), 41 second(s))

Yup, recompile with this option enabled.

Review this. Can't make Cocos2d-x compile on Ubuntu 18.04

Thanks i will try that and back to comment

I’m pretty sure i’m doing bad…
I went to Settings -> Compiler -> Compiler settings tab (Compiler flags subtab), then rightclick and selected “c++ only flags” then pasted what you put:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-pie -fexceptions -std=c++11 -Wno-deprecated-declarations -Wno-reorder")

save all, close, rebuild workspace and still the same…

where do i need to put the flag?
Thanks for your patience.

In your cmakelists file

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.