compiling c code problem

BlitzMax Forums/BlitzMax Beginners Area/compiling c code problem

Jur(Posted 2009) [#1]
I upgraded to Windows Vista32 and now i have a problem when compiling imported c code with BlitzMax 1.33. I have installed MinGW and I can rebuild all modules within maxIDE so I think that MinGW is working correctly.
The problem is that for commands like:
#include <stdio.h>
i am getting error message:
stdio.h: No such file or directory

I checked and found out that this file do exists in MinGV/include directory.

I donīt know anything about c programing, I am just using some available c code. I know that it should work so I think this problem is related to compiling under Vista. Any idea what could be wrong?


markcw(Posted 2009) [#2]
Did you set the environment path for MinGW?


Jur(Posted 2009) [#3]
Yes. And it compiles brl modules. Also I am logged as administrator and have full permission to maps with MinGW and my code.


Jur(Posted 2009) [#4]
This is a sample code from docs:

It works!
But if I put
#include <stdio.h>
at the top of c code I get the mentioned error.


Gabriel(Posted 2009) [#5]
Try renaming c_funcs.c to c_funcs.cpp and adjusting your Import to match.


Htbaa(Posted 2009) [#6]
Looks like the include path is missing since it's saying the include files don't exist. Renaming the stuff to cpp has no use me guesses.


markcw(Posted 2009) [#7]
Is MinGW installed to path 'C:\MinGW'?


xlsior(Posted 2009) [#8]
Is MinGW installed to path 'C:\MinGW'?


Good point -- under Vista MinGW is a lot pickier than XP to get it working right. On my computer it flat out wouldn't work when I installed it under c:\code\minGW, but c:\minGW worked fine.

Note that there are a few extra steps you need to perform when installing MinGW under Vista compared to XP... :-?
check out this page for more pointers:
http://www.blitzbasic.com/Community/posts.php?topic=67297


Jur(Posted 2009) [#9]
Yes, I have installed it in C:\MinGW and blitzmax is also in default directory.
I did everything like written here.
Renaming .c to .cpp does not help.
It is strange that brl. modules can be compiled and they use "include" a lot. I am trying to find a solution but any suggestions are welcomed.


Jur(Posted 2009) [#10]
I found the cause for my problem!
In Vista your code must be on the same partition as MinGW !!!


xlsior(Posted 2009) [#11]
I found the cause for my problem!
In Vista your code must be on the same partition as MinGW !!!


That sounds like a ton of fun tracking down. :-?

Good thing to know, though.


Drackbolt(Posted 2009) [#12]
Great to know; also applies to Windows 7 (naturally)!


Amanda Dearheart(Posted 2009) [#13]
@Drackbolt

Many critics herald Dune as the best modern day sci-fi tale written. Some say even more popular than Star Trek.

I've seen both the David Lynch version of Dune, I've seen the Sci-Fi channels mini-series, and I'm going to watch the children of Dune next week.

But i see nothing in the movies that would make it popular. to me it plays like a Grecian tragedy (for you thespians who know what I mwan about the theatre) about tw warring clans trying to control a thing called Spice. (is it a drug, was Herbert secretly trying to warn the world about the new thing going around Hollywood we affectionately now know as cocaine and later crack).

What are your thoughts on the subject?