User forums > Help
Creating portable CodeBlocks: linking MinGW
dave.berk:
Hi
I'm trying to create a portable version of codeblocks so I can use it in my uni. I have seen the FAQ but my problem is a little bit different. I have the MinGW directory inside the CodeBlocks folder and I want all links from inside CodeBlocks to MinGW to be location independent, so long as this structure is intact.
So what I did is use CodeBlocks builtin variables while setting the compiler toolchain location, like so: $(CODEBLOCKS)/MinGW
The problem I have is that:
1. Trying to compile anything, even the simplest hello world, I get errors
--- Code: ---||=== test, Debug ===|
\Project_Euler\test\main.c|1|stdio.h: No such file or directory|
\Project_Euler\test\main.c|2|stdlib.h: No such file or directory|
\Project_Euler\test\main.c||In function `main':|
\Project_Euler\test\main.c|6|warning: implicit declaration of function `printf'|
||=== Build finished: 2 errors, 1 warnings ===|
--- End code ---
2. When trying to create a project, it doesn't let me use the builtin variables, so I can't create location independent projects folder
Thanks
Dave
thomas:
--- Quote ---$(CODEBLOCKS)/MinGW
--- End quote ---
Should that not be $(CODEBLOCKS)/MinGW/include ?
TDragon:
For the toolchain location, I think dave.berk has it right. Dave, what version of GCC are you using? Can you enable full command-line logging? Do the files [drive]:\[codeblocks]\MinGW\include\stdio.h and stdlib.h in fact exist? (In other words, you have installed the full mingw-runtime package?)
dave.berk:
--- Quote from: TDragon on November 03, 2008, 03:56:57 pm ---For the toolchain location, I think dave.berk has it right. Dave, what version of GCC are you using? Can you enable full command-line logging? Do the files [drive]:\[codeblocks]\MinGW\include\stdio.h and stdlib.h in fact exist? (In other words, you have installed the full mingw-runtime package?)
--- End quote ---
You're right. I thought I had installed the whole package but I doing a search I could only find the c++ header, i.e. cstdio, not the stdio.h header. The weird thing is I can't find the c standard library libs and header anywhere in MinGW sourceforge repository. Since it's course homework, I can't do it in c++ :(.
Edit: I'm using GCC 3.4.5..
TDragon:
"stdio.h" is in the mingw-runtime dev package (the most recent release of which is mingwrt-3.15.1-mingw32-dev).
Navigation
[0] Message Index
[#] Next page
Go to full version