How to compile a Linux project under Windows

CodeLite installation/troubleshooting forum
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to compile a Linux project under Windows

Post by eranif »

stahta01 wrote:The above implies that something thinks its using MSVC options.
Indeed. wx-config (the sources are available under codelite's source tree) will use MSVC switches (/I /NOLOGO /D etc) if the WXCFG environment variable is set to "vc_lib/msw" (or something that starts with vc_*)
You should set it to gcc_dll/mswu, this is how it is set for me (from Settings -> Environment variables)

Code: Select all

WXWIN=C:\wxWidgets-3.0.0
WXCFG=gcc_dll\mswu
matbru wrote:I realized that I had main.o.d and gui.o.d files that contained references to my Unix pathnames.
I do not understand what happened (not) to these files when I cleaned and rebuilt (I will redo the test next time I boot under Linux).
These files (.o.d) are the dependency files generated by GCC so whenever you change a header file gcc will know to compile all files that are including it automatically.

To fix this (i.e. so you won't need to perform clean every time you switch OS) you should define separate build configurations for Linux and Windows
and make sure that the build configurations have different "IntermediateFolders" (Project Settings -> General, this is where codelite will instruct the makefile to place the object files + *.o.d files)

Read this for more info about the configuration manager:
http://codelite.org/LiteEditor/ConfigurationManager
Eran
Make sure you have read the HOW TO POST thread
Post Reply