Jump to content
  • entries
    943
  • comments
    5,899
  • views
    924,389

C++11 for Linux


Josh

1,246 views

 Share

The beta branch now contains an update that adds C++11 support for GCC on Linux. To use this you must enable C++11 support in the compiler settings in Code::Blocks. Select the Settings > Compiler and Debugger... menu item and then check the box indicated below.

 

blogentry-1-0-75248000-1479574342_thumb.png

 

All new projects created from the Leadwerks templates will work correctly out-of-the-box.

 

Your existing projects need a couple of new libraries added to them. The easiest way to do this is to open the CBP project file in a text editor. Find two chunks of text that look like this:

<Linker>
<Add library="$(LeadwerksPath)/Library/Linux/Debug/Leadwerks.a" />
<Add library="dl" />
<Add library="openal" />
<Add library="GL" />
<Add library="GLU" />
<Add library="$(LeadwerksPath)/Library/Linux/libluajit.a" />
<Add library="../../libsteam_api.so" />
<Add library="X11" />
<Add library="Xext" />
<Add library="pthread" />
</Linker>

 

Add these two libraries to the list. Remember, this will occur twice in the file.

<Add library="Xrender" />
<Add library="Xft" />

 

Save the project file and you're ready to use C++11 features with Leadwerks on Linux.

  • Upvote 1
 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   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.

×
×
  • Create New...