User forums > General (but related to Code::Blocks)

Premake-Generated-Project: Codeblocks creates binaries in the wrong directory!!!


Hello! I created a project for codeblocks using Premake but when I build the project, codeblocks instead of generating the binaries inside bin/Debug(Release) , it creates them into the directory where premake4.lua exists.

If you don't know how premake works, can you tell me if codeblocks has a project setting which tells it where to build binaries for Debug or Release configurations? This might help me figure it out.

This is how the project tree looks like:

Premake Root/

Notice that the codeblocks directory and everything inside it are generated by premake.
This is my premake script:

--- Code: ---solution "TestSolution"
configurations {"Debug", "Release"}
location "codeblocks"

project "Test"
kind "ConsoleApp"
language "C++"
files {"**.cpp", "**.h"}
links {"GL", "glfw", "GLEW"}
includedirs {"/usr/local/include", "/usr/include", "src/headers"}
libdirs {"/usr/lib", "/usr/local/lib64"}
location "codeblocks/Test"

file ="codeblocks/", "w");
file:write("export LIBGL_ALWAYS_SOFTWARE=1\n./bin/Debu/Test")

--- End code ---

As always, thank you   :)

I found the solution targetdir


[0] Message Index

Go to full version