User forums > Using Code::Blocks
Howto - Cross Compiling in Linux using MingW32
mandrav:
--- Quote from: wvdakker on November 19, 2007, 01:50:42 pm ---I have installed CodeBlocks, Mingw and wxWidgets in Linux.
Transfered a project created in Windows to the Linux env.
The DLL-files are build ok but there are no library files (.a) created.
The option 'Create import library' is enabled, but nothing there.
Any clue??
gr,
Willem
--- End quote ---
There are no "import libraries" in linux. You create shared objects (.so, equivalent to .dll) or static libraries (.a).
wvdakker:
--- Quote from: mandrav on November 19, 2007, 01:59:43 pm ---
There are no "import libraries" in linux. You create shared objects (.so, equivalent to .dll) or static libraries (.a).
--- End quote ---
If I am crosscompiling for windows then libs must be available... or ....??
Otherwise how do I link dll's to other dll's or exe files.
wvdakker:
Found the problem :)
These options where missing in the MingW32 Cross Compiler settings.
-Wl,--output-def=$def_output -Wl,--out-implib=$static_output -Wl,--dll
Adding them solved the problem.
szurilo:
Hi!
I installed mingw32 and set up the parameters of the GNU GCC compiler.
I realized the i586-mingw32msvc-gcc g++ etc. files are not in the /usr directory but the /usr/bin.
So i set the correct paths and files and set this copy of the compiler as default as this thread write them.
After this, I created a new empty console application project and a new build target.
I don't know whether is a must or not to set the platform to 'Windows' or i can leave it to 'All'.
Anyway i tried both. Actually i am really confused about the Project Settings tab, because its also consists a Platform option. :shock:
So i checked my Build target Files and click OK.
I selected my build target in the Build menu and push the magic Build button.
The output can be different according to i set the platforms type in the Project/Properties menu.
If i set it 'Windows', i got this message and no output created:
"proba" does not support the current platform. Skipping...
Nothing to be done.
If i leave the platform type on 'All' my project is builded and i got one output file without 'exe' extension and i cant run it with wine bec. its a Linux file, i guess.
So what is the problem?
CB 4893 nightly; wxWidgets 2.8.7; distro: Debian;
Szurilo
HalfNote5:
Thanks!
I'm an old C++ programmer, but new to Code::Blocks. It's great to be able to write a C++ program, and without moving it back and forth, be able to write it on my linux lappy, and compile it for all with Win32 machines of the clients that are buying it. ; )
Many thanks!
You're a kind person to detail the steps for the rest of us.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version