wdna Posted May 16, 2014 Share Posted May 16, 2014 Although my project compiles after I added 'pthread' and 'X11' to linker in build options, the Code::Blocks IDE is unable to find the declarations of the 'Leadwerks' namespace. For example: window = Leadwerks::Window::Create("MyGame", 200, 150, 1024, 768, Leadwerks::Window::Titlebar); When pressing LMB on 'Create' and choosing "Go to deceleration ..." the action results an error. My version of Code::Blocks is 13.12, the default install on Ubuntu 14.04. I did not find any 'special' way to add the files to IDE, their path is clearly in the include. Should I add what's inside /home/myuser/Leadwerks/Include/ to the project files or anything like that? Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted May 16, 2014 Share Posted May 16, 2014 Actually this should not be necessary. Did you create the project from within the Leadwerks-Editor? Quote Link to comment Share on other sites More sharing options...
wdna Posted May 16, 2014 Author Share Posted May 16, 2014 Actually this should not be necessary. Did you create the project from within the Leadwerks-Editor? Yes, I opened the files from ~/Documents/Leadwerks/Projects/Test/Projects/Linux with Code::Blocks -- this was generated by creating new C++ project. Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted May 16, 2014 Share Posted May 16, 2014 (edited) Since I am currently on windows, I can't try this myself, but you could try the following: Create a backup of your .cbp - file Open it with the text editor of your choice (if you are new to Linux, you might find a graphical one like "gedit" might fit your needs) Find the lines containing <Environment> <Variable name="LeadwerksPath" value='"..."' /> </Environment> (In my file they were lines 46ff) Make sure, the path between the quots is your Leadwerks directory (this should be the top-level directory, containing the folders Library, libs, Include, etc. Safe the file and load it into code::blocks If this works for you, something might have gone wrong with setting up the $LEADWERKS_LINUX_PATH variable. Edited May 16, 2014 by Ma-Shell Quote Link to comment Share on other sites More sharing options...
wdna Posted May 17, 2014 Author Share Posted May 17, 2014 Yes, that seems to be the the case: <Environment> <Variable name="LeadwerksPath" value='"/home/wdna/Leadwerks"' /> </Environment> I'm starting to think this is some kind of Code::Blocks bug? By looking at build configuration, without this variable compile should not work, but it does. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 17, 2014 Share Posted May 17, 2014 If you have a space in your Leadwerks path Code::Blocks can't read it. Quote 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 More sharing options...
Toaster Posted May 17, 2014 Share Posted May 17, 2014 I've noticed the same thing (running on Ubuntu 14.04 64bit & CB 13.12). It doesn't use the Leadwerks namespace even in the default App.cpp file but I have to refer to all that stuff with Leadwerks::Time::Update(), Leadwerks::Window and so on. I don't have any spaces in any of the paths, either. Could the .cbp file have the <Add library="pthread" /> and <Add library="X11" /> lines added to it by default? 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted May 18, 2014 Share Posted May 18, 2014 Yes they can! The Time and Window classes interfere with existing ones that only appear on Linux, unfortunately, thus the need to specify the namespace. Quote 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 More sharing options...
wdna Posted May 18, 2014 Author Share Posted May 18, 2014 Josh, Toaster, found the issue, I replaced: <Variable name="LeadwerksPath" value='"/home/wdna/Leadwerks"' /> with: <Variable name="LeadwerksPath" value="/home/wdna/Leadwerks" /> Looking at other definitions in project, this seemed a bit strange to set value like that with the '"' escape. Now everything works fine and I can view the source files. Like mentioned, it would be nice if this libraries will be auto added upon new projects: <Add library="pthread" /> <Add library="X11" /> 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted May 18, 2014 Share Posted May 18, 2014 Josh, Toaster, found the issue, I replaced: <Variable name="LeadwerksPath" value='"/home/wdna/Leadwerks"' /> with: <Variable name="LeadwerksPath" value="/home/wdna/Leadwerks" /> Looking at other definitions in project, this seemed a bit strange to set value like that with the '"' escape. Now everything works fine and I can view the source files. Like mentioned, it would be nice if this libraries will be auto added upon new projects: <Add library="pthread" /> <Add library="X11" /> Done. 1 Quote 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 More sharing options...
Recommended Posts
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.