Jump to content

Compile Error in Linux


Roland
 Share

Recommended Posts

Ubuntu 16.04 TLS

CodeBlocks 16.01

gcc 5.4.0

 

 

1. Create a new blank project, Test

2. Open Test/Projects/Linux/Test.cbp in CodeBlocks

3. Compile

 

This is what you will get

-------------------------------------

||=== Build: Debug in Test (compiler: GNU GCC Compiler) ===|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Directory.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Directory.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Stream.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Stream.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Texture.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Texture.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Drivers/Graphics/OpenGL2/OpenGL2Texture.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Drivers/Graphics/OpenGL2/OpenGL2Texture.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Directory.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Directory.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Stream.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Stream.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Texture.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Texture.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Drivers/Graphics/OpenGL2/OpenGL2Texture.h|2|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/home/rstralberg/.steam/steam/steamapps/common/Leadwerks/Include/Classes/Drivers/Graphics/OpenGL2/OpenGL2Texture.h|3|warning: ignoring #pragma warning [-Wunknown-pragmas]|

/mnt/Store/Leadwerks/Test/Source/main.cpp||In function ‘void DebugErrorHook(char*)’:|

/mnt/Store/Leadwerks/Test/Source/main.cpp|12|warning: unused variable ‘n’ [-Wunused-variable]|

/mnt/Store/Leadwerks/Test/Source/main.cpp||In function ‘int main(int, const char**)’:|

/mnt/Store/Leadwerks/Test/Source/main.cpp|76|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|

../../Source/App.o||In function `App::Start()':|

/mnt/Store/Leadwerks/Test/Source/App.cpp|16|undefined reference to `Leadwerks::Interpreter::GetGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|22|undefined reference to `Leadwerks::Interpreter::SetGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|25|undefined reference to `Leadwerks::FileSystem::GetFileType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|28|undefined reference to `Leadwerks::Interpreter::ExecuteFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|30|undefined reference to `Leadwerks::System::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|35|undefined reference to `Leadwerks::Interpreter::GetGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|38|undefined reference to `Leadwerks::Interpreter::PushString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

../../Source/App.o||In function `App::Loop()':|

/mnt/Store/Leadwerks/Test/Source/App.cpp|72|undefined reference to `Leadwerks::Interpreter::GetGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|77|undefined reference to `Leadwerks::Interpreter::GetGlobal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/App.cpp|80|undefined reference to `Leadwerks::Interpreter::PushString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

../../Source/main.o||In function `main':|

/mnt/Store/Leadwerks/Test/Source/main.cpp|35|undefined reference to `Leadwerks::FileSystem::StripAll(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|36|undefined reference to `Leadwerks::String::Right(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|36|undefined reference to `Leadwerks::String::Left(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|37|undefined reference to `Leadwerks::System::AppName[abi:cxx11]'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|38|undefined reference to `Leadwerks::FileSystem::GetAppDataPath[abi:cxx11]()'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|41|undefined reference to `Leadwerks::String::Lower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|48|undefined reference to `Leadwerks::FileSystem::GetFileType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|48|undefined reference to `Leadwerks::FileSystem::CreateDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|50|undefined reference to `Leadwerks::System::LoadSettings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|53|undefined reference to `Leadwerks::FileSystem::ExtractDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|53|undefined reference to `Leadwerks::System::AppPath[abi:cxx11]'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|59|undefined reference to `Leadwerks::System::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|59|undefined reference to `Leadwerks::String::Int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|62|undefined reference to `Leadwerks::System::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|65|undefined reference to `Leadwerks::Package::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|73|undefined reference to `Leadwerks::FileSystem::LoadDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|79|undefined reference to `Leadwerks::FileSystem::ExtractExt(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|79|undefined reference to `Leadwerks::String::Lower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|82|undefined reference to `Leadwerks::Package::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|89|undefined reference to `Leadwerks::System::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|93|undefined reference to `Leadwerks::System::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|93|undefined reference to `Leadwerks::String::Int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|94|undefined reference to `Leadwerks::Interpreter::Connect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|96|undefined reference to `Leadwerks::String[abi:cxx11](int)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|96|undefined reference to `Leadwerks::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|99|undefined reference to `Leadwerks::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|100|undefined reference to `Leadwerks::System::GetProperty(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|103|undefined reference to `Leadwerks::Interpreter::LoadBreakpoints(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|105|undefined reference to `Leadwerks::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|148|undefined reference to `Leadwerks::System::SaveSettings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'|

/mnt/Store/Leadwerks/Test/Source/main.cpp|148|undefined reference to `Leadwerks::System::Print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|

||error: ld returned 1 exit status|

||=== Build failed: 42 error(s), 18 warning(s) (0 minute(s), 1 second(s)) ===|

 

Seems all static functions in the Leadwerks library is unresolved.

Roland Strålberg
Website: https://rstralberg.com

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

Open your CBP file in a text editor and add this line:

<Add option="-D_GLIBCXX_USE_CXX11_ABI=0" />

 

I'm not sure if that should be an equals sign or a space. Can anyone confirm?

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Open your CBP file in a text editor and add this line:

<Add option="-D_GLIBCXX_USE_CXX11_ABI=0" />

 

I'm not sure if that should be an equals sign or a space. Can anyone confirm?

Equals sign is what ya want.

 

from: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html

-D name=definition

The contents of definition are tokenized and processed as if they appeared during translation phase three in a ‘#define’ directive. In particular, the definition will be truncated by embedded newline characters.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...