Page 1 of 1
makefile problem
Posted: Tue Feb 28, 2012 4:20 pm
by Denzelii
I'm using (try to use) v3.5.5377 on Windows 7 HUN.
Codelite is installed to c:\codelite, mingw installed c:\codelite\mingw-4.6.1. Path is containing c:\codelite;c:\codelite\mingw-4.6.1\bin. (makedir is working).
When I try to compile my project, I got:
----------Building project:[ test1 - Debug ]----------
mingw32-make.exe[1]: Entering directory `D:/Dokumentumok/codelite/hworld/test1'
gcc -o ./Debug/test1 @"D:\Dokumentumok\codelite\hworld\test1\test1.txt" -L.
gcc: error: ECHO: No such file or directory
gcc: error: kikapcsolva: No such file or directory
gcc: fatal error: no input files
compilation terminated.
mingw32-make.exe[1]: *** [Debug/test1] Error 1
ECHO kikapcsolva means: echo turned off.
When I compiling this simple project on windows xp sp3 everything working fine.
The problem is here:
...
ObjectsFileList :="D:\Dokumentumok\codelite\hworld\test1\test1.txt"
...
Objects=$(IntermediateDirectory)/hworldApp$(ObjectSuffix) $(IntermediateDirectory)/hworldMain$(ObjectSuffix)
...
$(OutputFile): $(IntermediateDirectory)/.d $(Objects)
@$(MakeDirCommand) $(@D)
@echo "" > $(IntermediateDirectory)/.d <== it is running fine, Debug/.d is containing ""
@echo $(Objects) > $(ObjectsFileList) <== it is generating test1.txt, with wrong content
$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)
test1.txt content: ECHO kikapcsolva
echo $(Objects) printing: Objects=./Debug/hworldApp.o ./Debug/hworldMain.o
echo $(Objects) > test1.txt generating the same wrong txt.
Where is the problem? MS changed the echo command?
Re: makefile problem
Posted: Tue Feb 28, 2012 10:20 pm
by frank_frl
Hi Denzelii,
as a workaround you can switch 'Pass object list to the linker via file' off in 'Build settings/Compilers/gnu gcc/Advanced' and see if it builds. Same for g++
Regards
Frank
Re: makefile problem
Posted: Wed Feb 29, 2012 12:28 pm
by Denzelii
Thanks, but it is not working.
It was already checked. I tried both checked and unchecked state, and build was failed.
The error if unchecked:
----------Building project:[ test1 - Debug ]----------
mingw32-make.exe[1]: Entering directory `D:/Dokumentumok/codelite/hworld/test1'
gcc -o ./Debug/test1 -L.
gcc: fatal error: no input files
compilation terminated.
mingw32-make.exe[1]: *** [Debug/test1] Error 1
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory `D:/Dokumentumok/codelite/hworld/test1'
The test1.txt is containing "ECHO kikapcsolva".
Re: makefile problem
Posted: Thu Mar 01, 2012 11:09 am
by eranif
Path is containing c:\codelite;c:\codelite\mingw-4.6.1\bin. (makedir is working).
The fact that you mentioned that, makes me wonder if you modified the PATH variable from within codelite?
To make sure its not a configuration problem:
- Close codelite
- Rename %appdata%\CodeLite to something else (e.g. %appdata%\CodeLite.1)
- Start codelite and try to build your project
If you are still facing problems, please zip and attach the workspace here ( you can delete the .tags file to reduce the zip size )
Eran
Re: makefile problem
Posted: Fri Mar 02, 2012 7:47 pm
by Denzelii
Thanks!
It's solved my basic problem. And you right, I forgot (I don't know where to have to do) to modify a PATH variable within Settings/Build Settings/gnu gcc/Tools/PATH enviroment.
Now I tried to compile a wxwidget project. I set WXCFG and WXWIN in the Settings/Environment Variables. (And I already set in thi windows enviroment variables). But the builder is not finding it:
----------Building project:[ wx1 - Debug ]----------
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `D:/Dokumentumok/codelite/wp/workspace/wx1'
gcc -o ./Debug/wx1 @"D:\Dokumentumok\codelite\wp\workspace\wx1\wx1.txt" -Lc:/CodeLite/MinGW-4.6.1/lib -L. -lwxmsw28ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows wx-config Error: No valid setup.h of wxWidgets has been found at location: c:\CodeLite\wxWidgets-2.8.12\lib\lib\gcc_lib\mswud\wx\setup.h
gcc: error: wx-config: No such file or directory..
If I trying to build it from the command line wx-config finding the WXWIN and the WXCFG variables. Where I have to set those values?
(and I already set it within the wx Project Settings/Common Settings/Environment Additional environment variables)
Re: makefile problem
Posted: Fri Mar 02, 2012 11:36 pm
by eranif
It seems that you are trying to build wx-widgets application in debug mode, but you dont have wxWidgets built in debug mode installed on your machine.
You could try and install codelite with mingw+wxwidgets from the binaries that I release here:
http://sourceforge.net/projects/codelit ... e/download
If you will accept the default paths it will save you alot of problems - it will simply compile ...without any problems
This package include MinGW 4.6.1 + WinAPI + wxWidgets 2.9.2 built in debug mode / release mode (monolithic DLL)
Eran
Re: makefile problem
Posted: Tue Mar 06, 2012 2:49 pm
by Denzelii
Thanks Eran!
But I have wx-widget (built in debug mode) on my computer.
What I trying to do: I want to setup my environment based on this:
http://codelite.org/WxWidgets/GettingRe ... derWindows (Do-It-Yourself-Way).
(When I downloaded codelite with wx-widget is working like a charm.)
Here's my steps:
1, Downloading Codelite width mingw, and installing this.
2, Downloading wx-widget, unzip, mingw32-make -f makefile.gcc clean
3, Compile wxwidget: mingw32-make -f makefile.gcc UNICODE=1 SHARED=0 MONOLITHIC=1 BUILD=debug
4, Adding environment variables to Settings > Environment Variables. (Actually I added these:
WXWIN=C:\CodeLite\wxWidgets-2.9.2
PATH=$(WXWIN)\lib\gcc_dll;$(PATH)
WXCFG=gcc_dll\mswu
because codelite width wxwidget used this.)
But when I try to compile, I'm getting:
Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
As you can see, WXWIN is already set. wx-widget already compiled with debug mode. I know, the prebuild version is working, but I want to know, how can I setup the enviroment.
I checked the registry.ini, there were one line difference. I checked the AppData/Roaming/Codelite/config/codelite.xml. There is 3 lines difference, but it is not relevent. I don't know what I have to set, to wx-config getting the WXWIN environment variable.
Re: makefile problem
Posted: Tue Mar 06, 2012 3:46 pm
by frank_frl
What are your project settings? For a debug version they should contain this:
g++:
Code: Select all
-g;-Wall;$(shell wx-config --wxcfg=gcc_dll/mswud --debug=yes --cxxflags --unicode=yes)
Linker:
Code: Select all
-g;$(shell wx-config --debug=yes --libs --unicode=yes);-Wl,--subsystem,windows -mwindows;
For release:
g++:
Code: Select all
-O2;$(shell wx-config --wxcfg=gcc_dll/mswu --debug=no --cxxflags --unicode=yes)
Linker:
Code: Select all
-g;$(shell wx-config --debug=no --libs --unicode=yes);-Wl,--subsystem,windows -mwindows;
To link against the static wxWidgets libs just change gcc_dll to gcc_lib.
Regards
Frank
Re: makefile problem
Posted: Tue Mar 06, 2012 4:14 pm
by eranif
There are 3 places where you could set an environment variable within codelite:
1) Settings -> Environment Variables
2) Workspace Settings (right click the workspace)
3) Project level (right click on the project -> settings -> environment)
The importance order:
project level >> workspace level >> global level
Make sure you got them set properly (i.e. project level does not override WXWIN from the global level with an incorrect value)
If you confirm that everything is set properly:
- Try setting it in the project level and see if it makes any difference
- Make sure that your wxWIdgets is installed where you set WXWIN
- Post here the *complete* build log + the file %appdata%\CodeLite\config\environment_variables.xml + your workspace zipped (you can exclude the .tags file to reudce file size)
Eran
Re: makefile problem
Posted: Fri Mar 09, 2012 6:42 pm
by Denzelii
Thanks Frank & Eran!
There were problem at the building option and also there were problem at the environment variables, but your help the sample code was finaly compiled.
Thanks